Indigo 0.95 |
indigo. i18n. characters
This module implements Unicode character properties. The names of the functions are very similar to the POSIX ctype functions, like isAlpha(), isAlNum(), toLower() etc. You can use this module instead of std.ctype or indigo.posix.ctype. Summary
isLower()
Returns true if the Unicode code point ch is a lowercase character, that is for general category “Ll” and some other code points. See also isUpper(). isUpper()
Returns true if the Unicode code point ch is an uppercase character, that is for general category “Lu” and some other code points. See also isLower(). toLower()
Returns the simple lowercase mapping for ch, or ch itself if there is no such mapping. Note that this function is not sufficient for all languages, thus you should use collation if possible. See also toUpper(). toUpper()
Returns the simple uppercase mapping for ch, or ch itself if there is no such mapping. Note that this function is not sufficient for all languages, thus you should use collation if possible. See also toLower(). |
Is the UTF-16 code unit a surrogate (U+D800..U+DFFF)?
int isSurrogate( wchar ch )
Is the UTF-16 code unit a lead surrogate (U+D800..U+DBFF)?
int isLeadSurrogate( wchar ch )
Is the UTF-16 code unit a trail surrogate (U+DC00..U+DFFF)?
int isTrailSurrogate( wchar ch )
Converts the two UTF-16 code units lead and trail, which must be a lead and a trail surrogate, to the equivalent Unicode code point.
dchar toUtf32( wchar lead, wchar trail )
Returns true if the Unicode code point ch is alphabetic, that is for general category “L” and some other code points.
public int isAlpha( dchar ch )
Returns true if the Unicode code point ch is a lowercase character, that is for general category “Ll” and some other code points.
public int isLower( dchar ch )
Returns true if the Unicode code point ch is an uppercase character, that is for general category “Lu” and some other code points.
public int isUpper( dchar ch )
Returns true if the Unicode code point ch is a whitespace.
public int isSpace( dchar ch )
Returns true if the Unicode code point ch is a decimal digit, that is for general category “Nd”.
public int isDigit( dchar ch )
Returns true if the Unicode code point ch is a hexadecimal digit.
public int isHexDigit( dchar ch )
Returns true if the Unicode code point ch is alphabetic or a decimal digit.
public int isAlNum( dchar ch )
Returns true if the Unicode code point ch is “defined”, that means it is assigned a character.
public int isDefined( dchar ch )
Returns true if the Unicode code point ch is a control character.
public int isControl( dchar ch )
Returns the simple lowercase mapping for ch, or ch itself if there is no such mapping.
public dchar toLower( dchar ch ) // TODO Insert link to our collate() function.
Returns the simple uppercase mapping for ch, or ch itself if there is no such mapping.
public dchar toUpper( dchar ch )