fromCodePoint (Function)
Signature: fromCodePoint(codePoint: int) -> Result<string, Error>
Description: Returns the single-character string for a nonzero Unicode scalar, or an error for U+0000 and non-scalars.
Parameters
- codePoint (int): The nonzero Unicode scalar value to encode
Returns: Result<string, Error>
Example
match fromCodePoint(233) {
Success { value } => print(value) // é
Error { message } => print(message)
}
match fromCodePoint 233
Success value => print value // é
Error message => print message