size_fmt 0.1.1

This library formats sizes in a human readable format
Documentation
  • Coverage
  • 100%
    8 out of 8 items documented5 out of 7 items with examples
  • Size
  • Source code size: 41.35 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • bydlw98/size_fmt
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bydlw98

size_fmt

CICD Crates.io Docs.rs License

This library formats sizes in a human readable format.


The API and Implementation is inspired by dtolnay/itoa.


Features

Example

fn main() {
    let mut buffer = size_fmt::Buffer::new();
    let printed = buffer.human_fmt(4096);

    assert_eq!(printed, "4.0K")
}