Class

UTF16LE

UTF16LE()

Create a new UTF-16LE mapping instance

Constructor

# new UTF16LE()

View Source UTF16LE.js, line 32

Extends

Methods

# getName() → {string}

Return the standard name of this charmap. All charmaps map from Unicode to the native charset, so the name returned from this function corresponds to the native charset.

Inherited From:

View Source Charmap.js, line 153

the name of the locale's language in English

string

# mapToNative(string) → {Uint8Array}

Map a string to the native character set. This string may be given as an intrinsic Javascript string object or an IString object.

Parameters:
Name Type Description
string string | IString

string to map to a different character set.

Overrides:

View Source Charmap.js, line 275

An array of bytes representing the string in the native character set

Uint8Array

# mapToUnicode(bytes) → {string}

Map a native string to the standard Javascript charset of UTF-16. This string may be given as an array of numbers where each number represents a code point in the "from" charset, or as a Uint8Array array of bytes representing the bytes of the string in order.

Parameters:
Name Type Description
bytes Array.<number> | Uint8Array

bytes to map to a Unicode string

Overrides:

View Source Charmap.js, line 314

A string in the standard Javascript charset UTF-16

string