Home

Sections

Theme switcher

Input Validation

Was this section helpful?
1 2 3 4 5 6 7 fun parseAmount(input: String): Double? { return input.toDoubleOrNull()?.takeIf { it > 0 } } fun parseStan(input: String): Int? { return input.toIntOrNull()?.takeIf { it > 0 } }
Was this section helpful?