Table of Contents

Class TextDecoder

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The TextDecoder interface represents a decoder for a specific text encoding, such as UTF-8, ISO-8859-2, or GBK. A decoder takes an array of bytes as input and returns a JavaScript string.

[Value("TextDecoder")]
public class TextDecoder
Inheritance
TextDecoder
Inherited Members

Remarks

-The TextEncoder interface describing the inverse operation.

See also on MDN

Constructors

TextDecoder()

public TextDecoder()

TextDecoder(string, TextDecoderOptions)

The TextDecoder() constructor returns a new TextDecoder object.

public TextDecoder(string label = null, TextDecoderOptions options = null)

Parameters

label string
options TextDecoderOptions

Remarks

-The TextDecoder interface it belongs to.

See also on MDN

Methods

Decode(Union225, TextDecodeOptions)

The TextDecoder.decode() method returns a string containing text decoded from the buffer passed as a parameter.

[Value("decode")]
public string Decode(Union225 input = default, TextDecodeOptions options = null)

Parameters

input Union225
options TextDecodeOptions

Returns

string

A string.

Remarks

The decoding method is defined in the current TextDecoder object.
This includes the expected encoding of the data, and how decoding errors are handled.

-The TextDecoder interface it belongs to.

See also on MDN