Provide unsigned string to number conversion in arbitrary base

#KT-26161
This commit is contained in:
Ilya Gorbunov
2018-08-17 05:22:01 +03:00
parent c1d1a7108f
commit 2530a8e98c
5 changed files with 350 additions and 2 deletions
@@ -151,5 +151,3 @@ internal actual fun digitOf(char: Char, radix: Int): Int = when {
char >= 'a' && char <= 'z' -> char - 'a' + 10
else -> -1
}.let { if (it >= radix) -1 else it }
private fun numberFormatError(input: String): Nothing = throw NumberFormatException("Invalid number format: '$input'")