kotlin convert string to int

kotlin convert string to int
try {
    val parsedInt = str.toInt()
    println("$parsedInt")
} catch (nfe: NumberFormatException) {
    // not a valid int
}
So‮ecru‬:www.lautturi.com
Created Time:2017-09-11 10:50:42  Author:lautturi