String to Num
Parse a string to integer or float.
Unlike from_str_radix
where user must provide a radix, this
method support auto hex, dec, oct, bin detection
This trait is default implemented for str
, so both str
and String
type can
use this method.
Returns FromStrRadixErr
on parse fail.
Examples
use ParseNum;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
License
This project is dual-licensed under MIT and Apache 2.0