2 releases

0.1.2 Jul 3, 2024
0.1.1 Apr 3, 2021

#1109 in Parser implementations

Download history 72/week @ 2024-07-22 77/week @ 2024-07-29 13/week @ 2024-08-05 25/week @ 2024-08-12 16/week @ 2024-08-19 9/week @ 2024-08-26 28/week @ 2024-09-02 26/week @ 2024-09-09 53/week @ 2024-09-16 31/week @ 2024-09-23 42/week @ 2024-09-30 29/week @ 2024-10-07 32/week @ 2024-10-14 31/week @ 2024-10-21 26/week @ 2024-10-28 39/week @ 2024-11-04

130 downloads per month
Used in pods-blitz

MIT/Apache

7KB
84 lines

fmtsize

Format memory sizes.

Usage

Import the trait and call the method.

use fmtsize::{Conventional, FmtSize};

println!("{}", 492_752_310_u64.fmt_size(Conventional)); // 469.93 MB

License

MIT or Apache 2.0. Pick whichever you like.


lib.rs:

fmtsize

fmtsize provides human-readable formatting for things like file sizes. It attempts to find the largest shorthand size possible for a given value, although it's limited to "gigabytes." Someday we may upgrade to terabytes. :)

println!("{}", 492_752_310_u64.fmt_size(Conventional)); // 469.93 MB

No runtime deps