Expand description
§Unbytify is a library to parse and represent digital units
§Installation
To start using unbytify
it’s enough to just enable it in your Cargo.toml
:
[dependencies]
unbytify = "0.2"
A simple example should be self-explanatory:
extern crate unbytify;
use unbytify::*;
fn main() {
assert_eq!(unbytify("1.5K"), Ok(1024 + 512));
assert_eq!(bytify(1024 + 512), (1.5, "KiB"));
}
Enums§
- Parse
Error - Represents parse failure