Char
Definitions
def charValue(c: java.lang.Character): Char
SourceGet the primitive Char value from its object representation, i.e., java.lang.Character.
This function is expected to be used when marshaling Chars from Java. Generally in Flix
code you should not need to use java.lang.Character
.
def digit(radix: { radix = Int32 }, c: Char): Option[Int32]
SourceReturns the integer value Char c
represents with respect to radix
. E.g.
digit(radix = 10, '1') => Some(1)
digit(radix = 16, 'a') => Some(11)
Returns None
if c
does not represent a number.
def forDigit(radix: { radix = Int32 }, n: Int32): Option[Char]
SourceReturns a character representation of the integer n
with respect to radix
. E.g.
forDigit(radix = 10, 1) => Some('1')
forDigit(radix = 16, 11) => Some('a')
Returns None
if n
is not representable as single character in the radix.
def getNumericValue(c: Char): Option[Int32]
SourceReturns the integer value the Char c
represents (e.g. '1' => Some(1)`
)
or None
if c
does not represent a number.
This function cannot handle supplementary characters.
def isAscii(c: Char): Bool
SourceReturns true
if the given char c
is an ascii character.
def isAsciiDigit(c: Char): Bool
SourceReturns true
if the given char c
is strictly in the range of ASCII digits 0...9.
def isDefined(c: Char): Bool
SourceReturns true
if the given char c
is defined either as a entry in the
UnicodeData file or a value within a range defined in the UnicodeData file.
def isDigit(c: Char): Bool
SourceReturns true
if the given char c
is a recognized Unicode digit.
This includes the ASCII range 0..9 but also Arabic-Indic digits, Devagari digits and Fullwidth digits.
def isHexDigit(c: Char): Bool
SourceReturns true
if the given char c
is in the range 0...F.
def isISOControl(c: Char): Bool
SourceReturns true
if the given char c
is an ISO control character.
def isLetter(c: Char): Bool
SourceReturns true
if the given char c
is a letter character.
def isLetterOrDigit(c: Char): Bool
SourceReturns true
if the given char c
is a recognized Unicode letter or digit.
def isLowerCase(c: Char): Bool
SourceReturns true
if the given char c
is lowercase.
def isMirrored(c: Char): Bool
SourceReturns true
if the given char c
is mirrored.
def isOctDigit(c: Char): Bool
SourceReturns true
if the given char c
is in the range 0...7.
def isSurrogate(c: Char): Bool
SourceReturns true
if the given char c
is a surrogate code unit.
def isSurrogatePair(high: { high = Char }, low: { low = Char }): Bool
SourceReturns true
if the given characters high
and low
represent a valid
Unicode surrogate pair.
def isTitleCase(c: Char): Bool
SourceReturns true
if the given char c
is titlecase, i.e. in the Unicode
category of title case letters.
def isUpperCase(c: Char): Bool
SourceReturns true
if the given char c
is uppercase.
def isWhiteSpace(c: Char): Bool
SourceReturns true
if the given char c
is a white space character.
def maxValue(): Char
SourceReturns the character given by the maximum valued byte.
def minValue(): Char
SourceReturns the character given by the all zero byte.
def toBmpCodePoint(c: Char): Int32
SourceReturns the code point representation of Char c
.
def toLowerCase(c: Char): Char
SourceConverts a letter to its lowercase version.
Returns the original character if it does not have a lowercase version.
def toString(c: Char): String
SourceReturns the character c
as a string.
def toSupplementaryCodePoint(high: { high = Char }, low: { low = Char }): Int32
SourceReturns the supplementary code point value of the surrogate pair high
and low
.
Caution - this function does no validation, use isSurrogatePair
to check high
and low
are valid.
def toTitleCase(c: Char): Char
SourceConverts 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(c: Char): Char
SourceConverts a letter to its uppercase version.
Returns the original character if it does not have a uppercase version.
def valueOf(c: Char): java.lang.Character
SourceConvert an Char value to its its object representation (i.e. java.lang.Character).
This function is expected to be used when marshaling Chars to Java. Generally in Flix
code you should not need to use java.lang.Character
.