Hi, can someone help me with something ? I have a ...
# getting-started
l
Hi, can someone help me with something ? I have a string of numbers and I want to convert to int each.
Copy code
fun calc(str: String): Int {
    var result: Int = 1

    str.forEach {
        //print("${it.toInt()}")
        result *= it.toInt()
    }

    return result
}
But that return me the Ascii number of the char. (Sorry for my English)