@[reducible, inline]
Determines if the given integer is a valid Unicode scalar value.
Note that values in [0xd800, 0xdfff]
are reserved for UTF-16 surrogate pairs.
Instances For
theorem
Char.isValidChar_of_isValidCharNat
(n : Nat)
(h : Char.isValidCharNat n)
:
isValidChar (UInt32.ofNat' n ⋯)
The numbers from 0 to 256 are all valid UTF-8 characters, so we can embed one in the other.
Equations
- Char.ofUInt8 n = { val := n.toUInt32, valid := ⋯ }
Instances For
Convert an upper case character to its lower case character.
Only works on basic latin letters.
Instances For
Convert a lower case character to its upper case character.
Only works on basic latin letters.