| Crates.io | f64-fixed |
| lib.rs | f64-fixed |
| version | 0.2.1 |
| created_at | 2025-11-11 15:11:16.532826+00 |
| updated_at | 2025-11-14 13:04:27.336193+00 |
| description | Convert f64 to fixed-length string |
| homepage | |
| repository | https://github.com/nanvel/f64-fixed |
| max_upload_size | |
| id | 1927443 |
| size | 7,096 |
f64-fixed converts f64 to a fixed size StringUse cases:
use f64_fixed::{to_fixed_string, ToFixedString};
assert_eq!(12345.0_f64.to_fixed_string(6), "12345 ");
assert_eq!(to_fixed_string(1., 6), "1 ");
assert_eq!(to_fixed_string(1., -6), " 1");
assert_eq!(to_fixed_string(12345., 6), "12345 ");
assert_eq!(to_fixed_string(123456., 6), "123456");
assert_eq!(to_fixed_string(1234567., 6), "1.23+6");