Skip to main content
Log in

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.

Examples:

print(chr(97)) # "a"
print(chr(8364)) # "€"
print(chr(97)) # "a"
print(chr(8364)) # "€"

.

Args:

  • c (Int): An integer that represents a code point.

Returns:

A string containing a single character based on the given code point.