core :: Char :: to_i
self
assert '5'.to_i == 5
# If `self` is a digit then return this digit else return -1. # # assert '5'.to_i == 5 fun to_i: Int do if self == '-' then return -1 else if is_digit then return self.code_point - '0'.code_point else return self.to_lower.code_point - 'a'.code_point + 10 end end