2 releases
0.1.1 | Jul 7, 2024 |
---|---|
0.1.0 | Jun 23, 2024 |
#126 in Value formatting
85 downloads per month
29KB
780 lines
size_fmt
This library formats sizes in a human readable format.
The API and Implementation is inspired by dtolnay/itoa
.
Features
- Supports no-std.
- No heap allocations.
- Does not go through
core::fmt::Formatter
.
Example
fn main() {
let mut buffer = size_fmt::Buffer::new();
let printed = buffer.human_fmt(4096);
assert_eq!(printed, "4.0K")
}
Dependencies
~415KB