Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
say "0.1E-5".looks_like_number; #=> true
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
func is_numeric(s) {
|
||||
(s ~~ /^[+-]?+(?=\.?[0-9])[0-9_]*+(?:\.[0-9_]++)?(?:[Ee](?:[+-]?+[0-9_]+))?\z/) ||
|
||||
(s ~~ /^0(?:b[10_]*|x[0-9A-Fa-f_]*|[0-9_]+\b)\z/)
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
var strings = %w(0 0.0 -123 abc 0x10 0xABC 123a -123e3 0.1E-5 50e);
|
||||
for str in strings {
|
||||
say ("%9s => %s" % (str, is_numeric(str)))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue