digitToInt
Returns the numeric value of the decimal digit that this Char represents. Throws an exception if this Char is not a valid decimal digit.
fun Char.digitToInt(): Int(source)
fun main() {
val digit: Char = '9'
val number = digit.digitToInt()
println("The numeric value of '$digit' is $number")
}