All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jtransc.numeric.parse.kt Maven / Gradle / Ivy

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 - 2024 Weber Informatics LLC | Privacy Policy