com.jtransc.numeric.parse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtransc-utils Show documentation
Show all versions of jtransc-utils Show documentation
JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.
package com.jtransc.numeric
fun String.toInt(radix: Int) = Integer.parseInt(this, radix)
fun String.toInt(radix: Int, default: Int) = try {
Integer.parseInt(this, radix)
} catch (t: Throwable) {
default
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy