Skip to main content
method TextEncoder.prototype.encode
TextEncoder.prototype.encode(input?: string): Uint8Array
Deprecated

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

Parameters

optional
input: string = 'an empty string'

The text to encode.

Return Type

Uint8Array
Back to top