Skip to main content

human_count

Function human_count 

Source
pub fn human_count(n: u64) -> String
Expand description

Human-friendly counts: 758, 93.6k, 1.5m (one decimal, lowercase k/m suffixes). The < 999.95 guards keep a value that would round to 1000.0 at one decimal from showing 1000.0k instead of rolling over to 1.0m.