pretty-bytes

Crates.iopretty-bytes
lib.rspretty-bytes
version0.2.2
sourcesrc
created_at2015-10-27 23:39:09.515284
updated_at2017-10-02 02:36:46.809972
descriptionConvert bytes to a human readable string
homepage
repositoryhttps://github.com/banyan/rust-pretty-bytes
max_upload_size
id3317
size5,028
Kohei Hasegawa (banyan)

documentation

README

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

Commit count: 23

cargo fmt