safeToLong

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

Parses the string as an Long 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.