Crates.io | size-display |
lib.rs | size-display |
version | 0.1.4 |
source | src |
created_at | 2020-05-08 17:52:56.649172 |
updated_at | 2020-06-22 21:27:04.279576 |
description | Display file sizes in human-readable form |
homepage | |
repository | https://github.com/germangb/size-display.git |
max_upload_size | |
id | 238969 |
size | 3,239 |
Display human readable file sizes.
use size_display::Size;
assert_eq!("24", format!("{}", Size(24)));
assert_eq!("4.2G", format!("{:.1}", Size(4509715660)));