In Kotlin String.toInt() and Char.toInt() do very different things.
>>> "9".toInt()
9
>>> '9'.toInt()
57
>>>
The former parses the String to an Int. The latter returns the Unicode codepoint value of the character.
In Kotlin String.toInt() and Char.toInt() do very different things.
>>> "9".toInt()
9
>>> '9'.toInt()
57
>>>
The former parses the String to an Int. The latter returns the Unicode codepoint value of the character.