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

#112 in Value formatting

Download history 3038/week @ 2023-02-05 3018/week @ 2023-02-12 3594/week @ 2023-02-19 3640/week @ 2023-02-26 3568/week @ 2023-03-05 2725/week @ 2023-03-12 3007/week @ 2023-03-19 2638/week @ 2023-03-26 2474/week @ 2023-04-02 2401/week @ 2023-04-09 2929/week @ 2023-04-16 2606/week @ 2023-04-23 2556/week @ 2023-04-30 2720/week @ 2023-05-07 2906/week @ 2023-05-14 3118/week @ 2023-05-21

11,434 downloads per month
Used in 30 crates (29 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

~175KB