Data update
This commit is contained in:
parent
61b93a2cd1
commit
5af6d93694
858 changed files with 20572 additions and 2082 deletions
|
|
@ -0,0 +1,18 @@
|
|||
/* gary chike 08/27/2023 */
|
||||
|
||||
class Main {
|
||||
static Void main() {
|
||||
inputs := ["152\n", "-3.141", "Foo123", "-0", "456bar", "1.0E10"]
|
||||
|
||||
inputs.each |Str input| { echo("$input.trim \tis " + (isNumeric(input) ? "numeric" : "not numeric"))}
|
||||
|
||||
static Bool isNumeric(Str input) {
|
||||
try {
|
||||
input.toFloat
|
||||
return true
|
||||
}
|
||||
catch(Err e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue