TextDecoder
ClassContains methods for Text decoding
- Available on all platforms
Index
Properties
Methods
Example
js var decoder = new TextDecoder() let decodedStr = decoder.decode([226,136,190,32,69,226,139,133,100,97]) print("decodedString="+decodedStr)
Extends
Constructors
Constructor
new TextDecoder(
encoding?):TextDecoder
Parameters
| Parameter | Type |
|---|---|
encoding? | string |
Returns
TextDecoder
Overrides
ScriptObject.constructor
Properties
encoding
readonlyencoding:string
The encoding format set in the TextDecoder.
Methods
decode()
decode(
data):string
Decodes a Uint8Array as a string. utf8 by default.
Parameters
| Parameter | Type |
|---|---|
data | Uint8Array |
Returns
string
getTypeName()
staticgetTypeName():TypeName<TextDecoder>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<TextDecoder>
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean