Skip to main content

encode

method TextEncoder.prototype.encode
Jump to headingTextEncoder.prototype.encode(input?: string): Uint8Array

UTF-8 encodes the input string and returns a Uint8Array containing the encoded bytes.

Parameters Jump to heading

optional
Jump to headinginput: string = 'an empty string'

The text to encode.

Return Type Jump to heading

Uint8Array
Back to top