edgeport - v1.0.6
    Preparing search index...

    Function toUtf8

    • Decodes UTF-8 bytes into a string.

      The inverse of fromUtf8. Use it instead of new TextDecoder().decode(bytes).

      Parameters

      • bytes: Uint8Array

        The UTF-8 bytes to decode.

      Returns string

      The decoded string.

      1.0.4

      import { toUtf8 } from 'edgeport/util';

      toUtf8(new Uint8Array([0x68, 0x69])); // 'hi'