2 releases
0.1.1 | Jul 7, 2024 |
---|---|
0.1.0 | Jun 23, 2024 |
#133 in Value formatting
Used in nls-ls
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
~400KB