Function decodeTextContent

  • Decodes a Uint8Array of bytes into a string using UTF-8 encoding.

    Returns

    The decoded string representation of the input bytes.

    Example

    const bytes = new Uint8Array([72, 101, 108, 108, 111]);
    const text = decodeTextContent(bytes); // → "Hello"

    Remarks

    • Uses the standard TextDecoder API with UTF-8 encoding.
    • Creates a copy of the input array before decoding, so the original Uint8Array is not modified.

    Parameters

    • content: Uint8Array

      The byte array to decode.

    Returns string

Generated using TypeDoc