dmd.root.utf

Functions related to UTF encoding.

Members

Functions

isBidiControl
bool isBidiControl(dchar c)

Checks whether an Unicode code point is a bidirectional control character.

isUniAlpha
bool isUniAlpha(dchar c)

Return !=0 if unicode alpha. Use table from C99 Appendix D.

utf_codeLength
int utf_codeLength(int sz, dchar c)

Returns the code length of c in code units for the encoding. sz is the encoding: 1 = utf8, 2 = utf16, 4 = utf32.

utf_codeLengthChar
int utf_codeLengthChar(dchar c)

Returns the code length of c in code units.

utf_decodeChar
string utf_decodeChar(const(char)[] s, size_t ridx, dchar rresult)

Decode a UTF-8 sequence as a single UTF-32 code point.

utf_decodeWchar
string utf_decodeWchar(const(wchar)[] s, size_t ridx, dchar rresult)

Decode a UTF-16 sequence as a single UTF-32 code point.

utf_isValidDchar
bool utf_isValidDchar(dchar c)

The Unicode code space is the range of code points [0x000000,0x10FFFF] except the UTF-16 surrogate pairs in the range [0xD800,0xDFFF]

Meta