4 releases

Uses old Rust 2015

0.2.2 Oct 2, 2017
0.2.1 Dec 15, 2016
0.2.0 Dec 14, 2016
0.1.0 Oct 27, 2015

#152 in Value formatting

Download history 3391/week @ 2024-01-03 3790/week @ 2024-01-10 4145/week @ 2024-01-17 3723/week @ 2024-01-24 4269/week @ 2024-01-31 4386/week @ 2024-02-07 4917/week @ 2024-02-14 3664/week @ 2024-02-21 4099/week @ 2024-02-28 4798/week @ 2024-03-06 4767/week @ 2024-03-13 4500/week @ 2024-03-20 3704/week @ 2024-03-27 4571/week @ 2024-04-03 3973/week @ 2024-04-10 3775/week @ 2024-04-17

16,910 downloads per month
Used in 34 crates (33 directly)

MIT license

4KB
67 lines

rust-pretty-bytes Circle CI

Convert bytes to a human readable string: 1337 → 1.34 kB

Useful for displaying file sizes for humans, Ported from sindresorhus/pretty-bytes

Usage

CLI

$ pretty-bytes 1337
1.34 kB

$ echo 1337 | pretty-bytes
1.34 kB

API

extern crate pretty_bytes;
use pretty_bytes::converter::convert;

println!("{}", convert(1337_f64));

License

MIT

Dependencies

~130–360KB