Skip to main content

humanize_number

Function humanize_number 

Source
pub fn humanize_number(n: f64) -> String
Expand description

Humanize a number into a compact display string:

inputoutput
42.0"42"
1_234.5"1,234.50"
12_438.2"12.4K"
1_500_000.0"1.50M"
2_700_000_000."2.70B"

Suitable for card values where horizontal space is scarce.