Skip to main content

numeric_str_ex

Function numeric_str_ex 

Source
pub fn numeric_str_ex(s: &str) -> Option<(Number, i8)>
Expand description

Like numeric_str, also reporting integer overflow as the engine’s is_numeric_string_ex does: 1 or -1 when an integer-looking string did not fit in i64 and became a float.

Leading and trailing whitespace (space, \t, \n, \r, \v, \f) is allowed; the body is an optional sign and a decimal integer or float with an optional exponent. Hex, octal and binary literals are not numeric.