size_fmt 0.1.1

This library formats sizes in a human readable format
Documentation

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")
}