You could write an extension that does it. Somethi...
# announcements
a
You could write an extension that does it. Something like…
Copy code
fun String.intOrDefault(defaultValue : Int = 0) : Int {
    return this.toInt() ?: defaultValue
}
ūüĎé 1