toLong

Parses the string to a Long number.

expect fun String.toLong(): Long(source)
val str = "9876543210"
val number: Long = str.toLong()
println(number) // 9876543210

Source