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
@@ -178,3 +178,6 @@ public fun String.toLongOrNull(radix: Int): Long? {
return if (isNegative) result else -result
}
internal fun numberFormatError(input: String): Nothing = throw NumberFormatException("Invalid number format: '$input'")