@exodus/bytes
    Preparing search index...
    • Decode UTF-16 bytes to a string (strict mode)

      Throws on invalid UTF-16 byte sequences

      Throws on non-even byte length.

      Parameters

      • arr: Uint16Array

        The bytes to decode

      • Optionalformat: "uint16"

        Input format (default: 'uint16')

      Returns string

      The decoded string

    • Decode UTF-16 bytes to a string (strict mode)

      Throws on invalid UTF-16 byte sequences

      Throws on non-even byte length.

      Parameters

      • arr: Uint8Array

        The bytes to decode

      • format: "uint8-le"

        Input format (default: 'uint16')

      Returns string

      The decoded string

    • Decode UTF-16 bytes to a string (strict mode)

      Throws on invalid UTF-16 byte sequences

      Throws on non-even byte length.

      Parameters

      • arr: Uint8Array

        The bytes to decode

      • format: "uint8-be"

        Input format (default: 'uint16')

      Returns string

      The decoded string

    • Decode UTF-16 bytes to a string (strict mode)

      Throws on invalid UTF-16 byte sequences

      Throws on non-even byte length.

      Parameters

      • arr: Uint8Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike>

        The bytes to decode

      • Optionalformat: Utf16Format

        Input format (default: 'uint16')

      Returns string

      The decoded string