safeToInt

fun String.safeToInt(defaultValue: Int, radix: Int = 10): Int(source)

Parses the string as an Int number and returns the result.

Since

0.1.0

Parameters

defaultValue

Return if the string is not a valid representation of a number.

radix

Radix for string to number conversion.