Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,9 @@
def isNumeric = {
def formatter = java.text.NumberFormat.instance
def pos = [0] as java.text.ParsePosition
formatter.parse(it, pos)
// if parse position index has moved to end of string
// them the whole string was numeric
pos.index == it.size()
}

View file

@ -0,0 +1,5 @@
println isNumeric('1')
println isNumeric('-.555')
println isNumeric('1,000,000')
println isNumeric(' 1 1 1 1 ')
println isNumeric('abcdef')