| Crates.io | pretty-bytes |
| lib.rs | pretty-bytes |
| version | 0.2.2 |
| created_at | 2015-10-27 23:39:09.515284+00 |
| updated_at | 2017-10-02 02:36:46.809972+00 |
| description | Convert bytes to a human readable string |
| homepage | |
| repository | https://github.com/banyan/rust-pretty-bytes |
| max_upload_size | |
| id | 3317 |
| size | 5,028 |
Convert bytes to a human readable string: 1337 → 1.34 kB
Useful for displaying file sizes for humans, Ported from sindresorhus/pretty-bytes
$ pretty-bytes 1337
1.34 kB
$ echo 1337 | pretty-bytes
1.34 kB
extern crate pretty_bytes;
use pretty_bytes::converter::convert;
println!("{}", convert(1337_f64));
MIT