If 0 <= self
<= 9, return the corresponding character.
assert 5.to_c == '5'
If 10 <= self
<= 36, return the corresponding letter [a..z].
assert 15.to_c == 'f'
# Return the corresponding digit character
# If 0 <= `self` <= 9, return the corresponding character.
#
# assert 5.to_c == '5'
#
# If 10 <= `self` <= 36, return the corresponding letter [a..z].
#
# assert 15.to_c == 'f'
fun to_c: Char
do
assert self >= 0 and self <= 36 # TODO plan for this
if self < 10 then
return (self + '0'.code_point).code_point
else
return (self - 10 + 'a'.code_point).code_point
end
end
lib/core/kernel.nit:859,2--875,4