amber/web/text_encoder

Values

pub fn encode(input: String) -> Uint8Array

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

pub fn encode_into(
  input: String,
  dest: Uint8Array,
) -> EncodeIntoResult

Encodes a string into the destination Uint8Array and returns the result of the encoding.

Search Document