Crates.io | si_format |
lib.rs | si_format |
version | 0.1.1 |
source | src |
created_at | 2024-04-10 16:28:34.08415 |
updated_at | 2024-04-10 17:59:31.971953 |
description | format numbers using metric prefixes |
homepage | |
repository | https://github.com/m-mueller678/si_format |
max_upload_size | |
id | 1203771 |
size | 18,127 |
This crate formats numbers using metric prefixes:
assert_eq!(123456.si_format().to_string(),"123k");
This provides more limited functionality than si-scale, but works without std, alloc, and (optionally) floating point arithmetic. This is primarily intended to make numbers in logs and debug printing more readable at a minimum runtime cost.