# parse_int
Parse &str with common prefixes to integer values:
```rust,ignore
use parse_int::parse;
let d = parse::<usize>("42")?;
assert_eq!(42, d);
let d = parse::<isize>("0x42")?;
assert_eq!(66, d);
let d = parse::<u8>("042")?;
assert_eq!(34, d);
let d = parse::<u16>("0b0110")?;
assert_eq!(6, d);
```
[Documentation](https://docs.rs/parse_int).
## License
This work is distributed under the super-Rust quad-license:
[Apache-2.0]/[MIT]/[BSL-1.0]/[CC0-1.0]
This is equivalent to public domain in jurisdictions that allow it (CC0-1.0).
Otherwise it is compatible with the Rust license, plus the option of the
runtime-exception-containing BSL-1. This means that, outside of public domain
jurisdictions, the source must be distributed along with author attribution and
at least one of the licenses; but in binary form no attribution or license
distribution is required.
[Apache-2.0]: https://opensource.org/licenses/Apache-2.0
[MIT]: https://www.opensource.org/licenses/MIT
[BSL-1.0]: https://opensource.org/licenses/BSL-1.0
[CC0-1.0]: https://creativecommons.org/publicdomain/zero/1.0