Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
println isNumeric('1')
|
||||
println isNumeric('-.555')
|
||||
println isNumeric('1,000,000')
|
||||
println isNumeric(' 1 1 1 1 ')
|
||||
println isNumeric('abcdef')
|
||||
Loading…
Add table
Add a link
Reference in a new issue