//ERDDAP/com.cohort.util/ScriptString2/isNumber
isNumber
[JVM]
fun isNumber(s: String): Boolean
This tries to quickly determine if the string is a correctly formatted number (including decimal, hexadecimal, octal, and "NaN" (any case)).
This may not be perfect. In the future, this may be changed to be perfect. That shouldn't affect its use.
Return
true if s is probably a number. This returns false if s is definitely not a number. "NaN" (case insensitive) returns true. (It is a numeric value of sorts.) null and "" return false.
Parameters
JVM
s | usually already trimmed, since any space in s will return false. |