Skip to main content
TextEncoder.encode - Encoding - Web documentation
method TextEncoder.encode
Private
TextEncoder.encode(input?: string): Uint8Array

Turns a string into binary data (in the form of a Uint8Array) using UTF-8 encoding.

Parameters

optional
input: string

Return Type

Uint8Array
Back to top