W3cubDocs

/Deno

TextEncoder

interface TextEncoder {
readonly encoding: "utf-8";
encode(input?: string): Uint8Array;
encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult;
}
var TextEncoder: {
prototype: TextEncoder;
new (): TextEncoder;
}
;

Properties

readonly encoding: "utf-8"

Returns "utf-8".

Methods

encode(input?: string): Uint8Array

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

encodeInto(input: string, dest: Uint8Array): TextEncoderEncodeIntoResult

© 2018–2021 the Deno authors
https://doc.deno.land/deno/stable/~/TextEncoder