Mojo function
chr
chr(c: Int) -> String
Returns a String based on the given Unicode code point. This is the inverse of the ord()
function.
This function is in the prelude, so you don't need to import it.
Example:
print(chr(97), chr(8364)) # "a €"
print(chr(97), chr(8364)) # "a €"
Args:
- c (
Int
): An integer that represents a code point.
Returns:
A string containing a single character based on the given code point.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!