MLE text encoding API(mle-js-encodings)
    Preparing search index...

    Class TextEncoder

    TextEncoder takes code points and returns UTF-8 bytes.

    Implements

    • TextEncoderCommon
    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    encoding: "utf-8" = 'utf-8'

    Always returns 'utf-8'.

    Methods

    • Encode the given string into a byte array.

      Parameters

      • input: string = ''

        the string to encode.

      Returns Uint8Array

    • Encode the given string and store the results in the given buffer.

      Parameters

      • input: string

        the string to encode.

      • destination: Uint8Array

        the buffer where the encoded string should be stored.

      Returns TextEncoderEncodeIntoResult

      an object describing the progress made in this call (code points read and bytes written).