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.
Constructors
TextDecoder()
public TextDecoder()
TextDecoder(string, TextDecoderOptions)
The TextDecoder() constructor returns a new TextDecoder object.
public TextDecoder(string label = null, TextDecoderOptions options = null)
Parameters
labelstringoptionsTextDecoderOptions
Remarks
-The TextDecoder interface it belongs to.
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
inputUnion225optionsTextDecodeOptions
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.