Composes a supplementary Unicode code point from the given UTF-16 surrogate
pair. If leadSurrogate isn't a leading surrogate code point or trailSurrogate
isn't a trailing surrogate code point, null is returned.
|
code » | |||
Determines the length of the string needed to represent the specified
Unicode code point.
|
code » | |||
![]()
Sets up the character map, lazily. Some characters are indexed by their
decimal value.
|
code » | |||
Gets a character from the given Unicode value. If the given code point is not
a valid Unicode code point, null is returned.
|
code » | |||
Returns the Unicode code point at the specified index.
If the char value specified at the given index is in the leading-surrogate
range, and the following index is less than the length of
string , and
the char value at the following index is in the trailing-surrogate range,
then the supplementary code point corresponding to this surrogate pair is
returned.
If the char value specified at the given index is in the trailing-surrogate
range, and the preceding index is not before the start of string , and
the char value at the preceding index is in the leading-surrogate range, then
the negated supplementary code point corresponding to this surrogate pair is
returned.
The negation allows the caller to differentiate between the case where the
given index is at the leading surrogate and the one where it is at the
trailing surrogate, and thus deduce where the next character starts and
preceding character ends.
Otherwise, the char value at the given index is returned. Thus, a leading
surrogate is returned when it is not followed by a trailing surrogate, and a
trailing surrogate is returned when it is not preceded by a leading
surrogate.
Arguments:
Returns: number
The code point at the given index. If the given index is
that of the start (i.e. lead surrogate) of a surrogate pair, returns the code
point encoded by the pair. If the given index is that of the end (i.e. trail
surrogate) of a surrogate pair, returns the negated code pointed encoded by
the pair.
|
code » | |||
Gets whether the given code point is a leading surrogate character.
|
code » | |||
Determines whether the specified Unicode code point is in the supplementary
Unicode characters range.
|
code » | |||
Gets whether the given code point is a trailing surrogate character.
|
code » | |||
Gets a string padded with given character to get given size.
|
code » | |||
Gets Unicode value of the given character.
|
code » | |||
Gets the U+ notation string of a Unicode character. Ex: 'U+0041' for 'A'.
|
code » | |||
Gets the name of a character, if available, returns null otherwise.
|
code » |