GitHub | crates.io | Documentation | Issues | Changelog
strtoint provides a function of the same name for parsing integer literals
from strings, with support for the base prefixes 0x, 0o, and 0b for
hexadecimal, octal, and binary literals, respectively.
This crate supports parsing into all primitive integer types built into Rust, along with their "NonZero" equivalents.
If the std feature (enabled by default) is disabled, this crate will be built
in no-std mode. The only difference is that StrToIntError only implements
the std::error::Error trait under std.
Installation
strtoint requires version 1.56 of Rust or higher. To use the strtoint
library in your Cargo project, add the following to your Cargo.toml:
[]
= "0.1.0"
Examples
use NonZeroUsize;
use strtoint;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert!;
assert_eq!;
assert!;