Utilities for Char
(character)
Characters represented as Unicode code points.
public let toNat32 : (char : Char) -> Nat32
Convert character char
to a word containing its Unicode scalar value.
public let fromNat32 : (nat32 : Nat32) -> Char
Convert w
to a character.
Traps if w
is not a valid Unicode scalar value.
Value w
is valid if, and only if, w < 0xD800 or (0xE000 <= w and w <= 0x10FFFF)
.
public let toText : (char : Char) -> Text
Convert character char
to single character text.
public func isDigit(char : Char) : Bool
Returns true
when char
is a decimal digit between 0
and 9
, otherwise false
.
public let isWhitespace : (char : Char) -> Bool
Returns whether char
is a whitespace character.
public let isLower : (char : Char) -> Bool
Returns whether char
is a lowercase character.
public let isUpper : (char : Char) -> Bool
Returns whether char
is an uppercase character.
public let isAlphabetic : (char : Char) -> Bool
Returns whether char
is an alphanumeric character.