flix

0.54.0

CodePoint

Definitions

def charCount(cp: Int32): Int32 Source

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.

def getName(cp: Int32): Option[String] Source

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.

def getNumericValue(cp: Int32): Option[Int32] Source

Returns the integer value representated 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.

def highSurrogate(cp: Int32): Option[Char] Source

Optionally returns the high surrogate character of the code point cp if cp is a supplementary character.

def isAlphabetic(cp: Int32): Bool Source

Returns true if the given code point cp represents an alphabetic character.

def isAscii(cp: Int32): Bool Source

Returns true if the given char c is an ascii character.

def isAsciiDigit(cp: Int32): Bool Source

Returns true if the given code point cp represents a character strictly in the range of ASCII digits 0...9.

def isBmpCodePoint(cp: Int32): Bool Source

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.

def isDefined(cp: Int32): Bool Source

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.

def isDigit(cp: Int32): Bool Source

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.

def isHexDigit(cp: Int32): Bool Source

Returns true if the given code point cp represents a character in the range 0...F.

def isISOControl(cp: Int32): Bool Source

Returns true if the given code point cp is an ISO control character.

def isIdeographic(cp: Int32): Bool Source

Returns true if the given code point cp is Chinese, Japanase, Korean or Vietnamese ideograph.

def isLetter(cp: Int32): Bool Source

Returns true if the given code point cp represents a letter character.

def isLetterOrDigit(cp: Int32): Bool Source

Returns true if the given code point cp represents a recognized Unicode letter or digit.

def isLowerCase(cp: Int32): Bool Source

Returns true if the given code point cp represents a lowercase letter.

def isMirrored(cp: Int32): Bool Source

Returns true if the given code point cp is mirrored.

def isOctDigit(cp: Int32): Bool Source

Returns true if the given code point cp represents a character in the range 0...7.

def isSupplementaryCodePoint(cp: Int32): Bool Source

Returns true if the given code point cp is in Unicode's supplementary character range.

def isTitleCase(cp: Int32): Bool Source

Returns true if the given code point cp represents a titlecase letter.

def isUpperCase(cp: Int32): Bool Source

Returns true if the given code point cp represents an uppercase letter.

def isValidCodePoint(cp: Int32): Bool Source

Returns true if the code point cp is between U+0000 and U+10FFFF.

def isWhiteSpace(cp: Int32): Bool Source

Returns true if the given code point cp represents a white space character.

def lowSurrogate(cp: Int32): Option[Char] Source

Optionally returns the low surrogate character of the code point cp if cp is a supplementary character.

def maxValue(): Int32 Source

Returns the maximum integer value of a Unicode code point.

def minValue(): Int32 Source

Returns the minimum integer value of a Unicode code point.

def toBmpChar(cp: Int32): Option[Char] Source

Optionally returns a Char represention the code point cp if cp is within Unicode's Basic Multilingual Plane.

def toChars(cp: Int32): Option[Vector[Char]] Source

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.

def toLowerCase(cp: Int32): Int32 Source

Converts a code point representing a letter to its lowercase version.

Returns the original code point if it does not have a lowercase version.

def toString(cp: Int32): String Source

Returns a String representing the code point cp.

def toSupplementaryChars(cp: Int32): Option[(Char, Char)] Source

Optionally returns a pair of Chars representing the high and low surrogate characters of the code point cp if cp is a supplementary character.

def toTitleCase(cp: Int32): Int32 Source

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.

def toUpperCase(cp: Int32): Int32 Source

Converts a code point representing a letter to its uppercase version.

Returns the original code point if it does not have a uppercase version.