flix

0.75.2

Char

Definitions

def charValue(c: java.lang.Character): Char§ Source

Get 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]§ Source

Returns 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]§ Source

Returns 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]§ Source

Returns the integer value the Char c represents (e.g. '1' => Some(1)``) or Noneifc` does not represent a number.

This function cannot handle supplementary characters.

def isAscii(c: Char): Bool§ Source

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

def isAsciiDigit(c: Char): Bool§ Source

Returns true if the given char c is strictly in the range of ASCII digits 0...9.

def isDefined(c: Char): Bool§ Source

Returns 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§ Source

Returns 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§ Source

Returns true if the given char c is in the range 0...9, A...F, or a...f.

def isISOControl(c: Char): Bool§ Source

Returns true if the given char c is an ISO control character.

def isLetter(c: Char): Bool§ Source

Returns true if the given char c is a letter character.

def isLetterOrDigit(c: Char): Bool§ Source

Returns true if the given char c is a recognized Unicode letter or digit.

def isLowerCase(c: Char): Bool§ Source

Returns true if the given char c is lowercase.

def isMirrored(c: Char): Bool§ Source

Returns true if the given char c is mirrored.

def isOctDigit(c: Char): Bool§ Source

Returns true if the given char c is in the range 0...7.

def isSurrogate(c: Char): Bool§ Source

Returns true if the given char c is a surrogate code unit.

def isSurrogatePair(high: { high = Char }, low: { low = Char }): Bool§ Source

Returns true if the given characters high and low represent a valid Unicode surrogate pair.

def isTitleCase(c: Char): Bool§ Source

Returns true if the given char c is titlecase, i.e. in the Unicode category of title case letters.

def isUpperCase(c: Char): Bool§ Source

Returns true if the given char c is uppercase.

def isWhitespace(c: Char): Bool§ Source

Returns true if the given char c is a white space character.

def maxValue(): Char§ Source

Returns the character given by the maximum valued byte.

def minValue(): Char§ Source

Returns the character given by the all zero byte.

def toBmpCodePoint(c: Char): Int32§ Source

Returns the code point representation of Char c.

def toLowerCase(c: Char): Char§ Source

Converts a letter to its lowercase version.

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

def toString(c: Char): String§ Source

Returns the character c as a string.

def toSupplementaryCodePoint(high: { high = Char }, low: { low = Char }): Int32§ Source

Returns 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§ Source

Converts 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§ Source

Converts 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§ Source

Convert 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.