toDoubleOrNull
Parses the string as a Double number and returns the result or null if the string is not a valid representation of a number.
expect fun String.toDoubleOrNull(): Double?(source)
fun main() {
val valid = "123.45"
val invalid = "abc"
println(valid.toDoubleOrNull()) // prints 123.45
println(invalid.toDoubleOrNull()) // prints null
}