Function atoi_radix10::parse_from_str [−][src]
pub fn parse_from_str<T: FromStrRadixHelper, S: AsRef<str>>(
s: S
) -> Result<T, ParseIntErrorPublic>
Expand description
Parses a UTF8 &str as a number.
It has exactly the same semantics as std::str::parse
,
but faster. (compiled with nightly,simd features
and target native cpu will get the absolute fastest result.)
Positives are slightly faster than negatives when parsing and
if you don’t need to put a leading +
then that will be faster too.
Examples
let s = "+000123"; assert_eq!(atoi_radix10::parse_from_str(s), Ok(123));