1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # humfmt
//!
//! Ergonomic human-readable formatting toolkit for Rust.
//!
//! `humfmt` provides lightweight, fluent utilities for rendering machine values
//! into readable strings designed for humans.
//!
//! ## Quick examples
//!
//! ```rust
//! use humfmt::Humanize;
//!
//! assert_eq!(humfmt::number(15320).to_string(), "15.3K");
//! assert_eq!(1_500_000.human_number().to_string(), "1.5M");
//! ```
//!
//! ## Builder customization
//!
//! ```rust
//! use humfmt::{Humanize, NumberOptions};
//!
//! let out = 15_320.human_number_with(
//! NumberOptions::new()
//! .precision(2)
//! .long_units()
//! );
//!
//! assert_eq!(out.to_string(), "15.32 thousand");
//! ```
//!
//! ## Current modules
//!
//! - compact number formatting
//! - configurable precision
//! - locale-ready suffix system
//!
//! More humanizers (`bytes`, `duration`, `ago`, `ordinal`) are planned.
extern crate alloc;
pub use ;
pub use Humanize;