CodePoint
The CodePoint module complements the Char module. Char only
represents characters in Unicode's Basic Multilingual Plane
(U+0000 to U+FFFF).
CodePoint extends access to include supplementary characters so all
Unicode characters can be represented.
Definitions
Returns the number of Chars needed to represent the code point cp.
The answer is either 2 for a supplementary character or 1 for any other character.
Returns the name of the code point cp.
See the Java JDK documentation of the method java.lang.Character.getName for a full
description of how names are derived.
Returns the integer value represented by the code point cp e.g. code point 0x0031
which is the char '1' returns Some(1).
Returns None if cp does not represent a number.
This function handles supplementary characters.
Optionally returns the high surrogate character of the code point cp
if cp is a supplementary character.
Returns true if the given code point cp represents an alphabetic character.
Returns true if the given code point cp represents a character strictly in the
range of ASCII digits 0...9.
Returns true if the given code point cp is within Unicode's Basic Multilingual Plane.
If the code point is within the BMP it can be represented by Flix's Char datatype.
Returns true if the given code point cp is defined either as a entry in the
UnicodeData file or a value within a range defined in the UnicodeData file.
Returns true if the given code point cp represents a recognized Unicode digit.
This includes the ASCII range 0..9 but also Arabic-Indic digits, Devagari digits and Fullwidth digits.
Returns true if the given code point cp represents a character in the range 0...F.
Returns true if the given code point cp is an ISO control character.
Returns true if the given code point cp is Chinese, Japanase, Korean
or Vietnamese ideograph.
Returns true if the given code point cp represents a letter character.
Returns true if the given code point cp represents a recognized Unicode letter or digit.
Returns true if the given code point cp represents a lowercase letter.
Returns true if the given code point cp represents a character in the range 0...7.
Returns true if the given code point cp is in Unicode's supplementary character range.
Returns true if the given code point cp represents a titlecase letter.
Returns true if the given code point cp represents an uppercase letter.
Returns true if the code point cp is between U+0000 and U+10FFFF.
Returns true if the given code point cp represents a white space character.
Optionally returns the low surrogate character of the code point cp
if cp is a supplementary character.
Optionally returns a Char represention the code point cp if cp is within
Unicode's Basic Multilingual Plane.
Optionally returns a vector of Chars representing the code point cp.
A valid Some(_) answer is either a length 2 Vector for a supplementary character
or a length 1 Vector for any other valid character.
Returns 'None' if cp is not a valid code point.
Converts a code point representing a letter to its lowercase version.
Returns the original code point if it does not have a lowercase version.
Optionally returns a pair of Chars representing the high and low surrogate characters of the
code point cp if cp is a supplementary character.
Converts a code point representing a letter to its titlecase version.
Returns the original character if it does not have either a titlecase version or a mapping to uppercase.