mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-01-09 12:23:15 -08:00
15 lines
284 B
Awk
15 lines
284 B
Awk
# isnumeric --- check whether a value is numeric
|
|
|
|
function isnumeric(x, f)
|
|
{
|
|
switch (typeof(x)) {
|
|
case "strnum":
|
|
case "number":
|
|
return 1
|
|
case "string":
|
|
return (split(x, f, " ") == 1) && (typeof(f[1]) == "strnum")
|
|
default:
|
|
return 0
|
|
}
|
|
}
|