Created
December 13, 2020 10:30
-
-
Save gahfy/621817536f03f779f89cd613a5d83f42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main(){ | |
val context = StateContext() | |
val test1 = "123." | |
val test2 = "123er45" | |
val test3 = "-145.36" | |
println("$test1 is ${if(context.parseString(test1)) "" else "not "}a valid number.") | |
println("$test2 is ${if(context.parseString(test2)) "" else "not "}a valid number.") | |
println("$test3 is ${if(context.parseString(test3)) "" else "not "}a valid number.") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment