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.
```rust use stringtonum::ParseNum;
asserteq!("0".parsenum::
asserteq!("0x01".parsenum::
asserteq!("0XfF".tostring().parsenum::
This project is dual-licensed under MIT and Apache 2.0