Class TextEncoder

TextEncoder takes a UTF-8 encoded string of code points as input and return a stream of bytes.

MDN Reference

Hierarchy

  • TextEncoder

Implements

Constructors

Properties

Methods

Constructors

  • Returns TextEncoder

Properties

encoding: string

Methods

  • Returns the result of running UTF-8's encoder.

    MDN Reference

    Parameters

    • Optional input: string

    Returns Uint8Array

  • Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as an object wherein read is the number of converted code units of source and written is the number of bytes modified in destination.

    Note: Not currently supported.

    MDN Reference

    Parameters

    Returns TextEncoderEncodeIntoResult

Generated using TypeDoc