Char
Edit on GitHubUtilities for working with characters. A Grain Char
represents a single Unicode scalar value.
Values
Char.min
The minimum Unicode scalar value.
Char.max
The maximum Unicode scalar value.
Char.isValid
Returns true if the given number is a valid Unicode scalar value.
Char.code
Returns the integer value of the Unicode code point for the character.
Char.fromCode
Returns the Char for the given Unicode code point. Fails if the code point is invalid.
Char.succ
Returns the next valid Unicode character by scalar value. Fails if the input character is U+10FFFF.
Char.pred
Returns the previous valid Unicode character by scalar value. Fails if the input character is U+0000.
Char.toString
Creates a new string containing the character.