SHIP:Sail:codepointToString

From Serious Documentation
Jump to: navigation, search
Function Returns Introduced Description
codepointToString String v4.0 Returns a single character string for the specified Unicode-16 codepoint. If the Codepoint is invalid, the string is empty.

Note that fonts rarely contain more than a few hundred codepoints out of all possible codepoints, so just because a string contains a valid Codepoint does not mean that the character (aka glyph) can be displayed on the screen.

See Also:

Prototype

String codepointToString(Codepoint);

Parameters/Return Value

Parameter Data Type Description
codepoint Integer Unicode-16 codepoint
Return String Single character string representing the Codepoint

Detailed Description

The codepointToString() function returns the single character string representing the 16-bit Unicode codepoint number specified.

An invalid codepoint (negative or greater than 65535) results in an empty string.

Examples

Example Result Notes
codepointToString(104); "h"
codepointToString(100000); "" Invalid Codepoint
codepointToString(-1); "" Invalid Codepoint
codepointToString(0x2122); "™"

References