edgeport - v1.0.6
    Preparing search index...

    Function fromUtf8

    • Encodes a string as UTF-8 bytes.

      The inverse of toUtf8. Use it instead of new TextEncoder().encode(s).

      Parameters

      • s: string

        The string to encode.

      Returns Uint8Array

      The UTF-8 bytes.

      1.0.4

      import { fromUtf8 } from 'edgeport/util';

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