ddmd.utf

Undocumented in source.

Members

Aliases

dchar_t
alias dchar_t = utf32_t
Undocumented in source.
utf16_t
alias utf16_t = ushort

A UTF-8 code unit A UTF-16 code unit

utf32_t
alias utf32_t = uint

A UTF-32 code unit

Functions

isUniAlpha
bool isUniAlpha(dchar_t c)

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

utf_codeLength
int utf_codeLength(int sz, dchar_t 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_t c)

Returns the code length of c in code units.

utf_codeLengthWchar
int utf_codeLengthWchar(dchar_t c)
Undocumented in source. Be warned that the author may not have intended to support it.
utf_decodeChar
const(char)* utf_decodeChar(const(char)* s, size_t len, size_t* pidx, dchar_t* presult)

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

utf_decodeWchar
const(char)* utf_decodeWchar(const(utf16_t)* s, size_t len, size_t* pidx, dchar_t* presult)

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

utf_encode
void utf_encode(int sz, void* s, dchar_t c)
Undocumented in source. Be warned that the author may not have intended to support it.
utf_encodeChar
void utf_encodeChar(char* s, dchar_t c)
Undocumented in source. Be warned that the author may not have intended to support it.
utf_encodeWchar
void utf_encodeWchar(utf16_t* s, dchar_t c)
Undocumented in source. Be warned that the author may not have intended to support it.
utf_isValidDchar
bool utf_isValidDchar(dchar_t c)

The Unicode code space is the range of code points [0x000000,0x10FFFF] except the UTF-16 surrogate pairs in the range [0xD800,0xDFFF] and non-characters (which end in 0xFFFE or 0xFFFF).

Manifest constants

ALPHA_TABLE_LENGTH
enum ALPHA_TABLE_LENGTH;
Undocumented in source.

Static variables

ALPHA_TABLE
const(utf16_t)** ALPHA_TABLE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF16_DECODE_INVALID_CODE_POINT
const(char)* UTF16_DECODE_INVALID_CODE_POINT;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF16_DECODE_INVALID_SURROGATE
const(char)* UTF16_DECODE_INVALID_SURROGATE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF16_DECODE_OK
const(const(char)*) UTF16_DECODE_OK;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF16_DECODE_TRUNCATED_SEQUENCE
const(char)* UTF16_DECODE_TRUNCATED_SEQUENCE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF16_DECODE_UNPAIRED_SURROGATE
const(char)* UTF16_DECODE_UNPAIRED_SURROGATE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_DECODE_INVALID_CODE_POINT
const(char)* UTF8_DECODE_INVALID_CODE_POINT;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_DECODE_INVALID_TRAILER
const(char)* UTF8_DECODE_INVALID_TRAILER;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_DECODE_OK
const(const(char)*) UTF8_DECODE_OK;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_DECODE_OUTSIDE_CODE_SPACE
const(char)* UTF8_DECODE_OUTSIDE_CODE_SPACE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_DECODE_OVERLONG
const(char)* UTF8_DECODE_OVERLONG;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_DECODE_TRUNCATED_SEQUENCE
const(char)* UTF8_DECODE_TRUNCATED_SEQUENCE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.
UTF8_STRIDE
const(uint)* UTF8_STRIDE;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Meta