Skip to main content

parse_num_span

Function parse_num_span 

Source
pub fn parse_num_span(s: &[u8]) -> Option<(i64, f64, bool)>
Expand description

Parse a span of JSON numeric bytes. Returns Some((as_i64, as_f64, is_int)) or None if not a valid number. Canonical JSON numbers only: -?\d+(\.\d+)?(e±\d+)?.