If self is a digit then return this digit else return -1.

assert '5'.to_i    == 5

Property definitions

core $ Char :: to_i
	# 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
lib/core/kernel.nit:950,2--963,4