1 stable release
1.0.0 | Oct 5, 2019 |
---|
#358 in Value formatting
617 downloads per month
8KB
108 lines
big-bytes
Converts a number to the largest possible multiple of the byte unit
Example
use big_bytes::BigByte;
let bytes = 2.456 * 1024_f32.powi(3);
assert_eq!("2.46 GiB", bytes.big_byte(2));
lib.rs
:
Helps represent bytes with the largest possible mutliple of the byte unit.
Example
use big_bytes::BigByte;
let bytes = 2.456 * 1024_f32.powi(3);
assert_eq!("2.46 GiB", bytes.big_byte(2));