This simple package formats numbers as pretty strings. It is flexible enough to deal with different number of decimals, different thousand separators and diffetent decimal separator.
Format a float number as a pretty string:
>>> formatFloat { decimals = 2, thousandSeparator = ",", decimalSeparator = "." } 1234.5567
"1,234.56"
>>> formatFloat (Locale 3 "." ",") -7654.3210
"-7.654,321"
>>> formatFloat (Locale 1 "," ".") -0.01
"0.0"Format a integer number as a pretty string:
>>> formatInt { decimals = 1, thousandSeparator = ",", decimalSeparator = "." } 0
"0.0"
>>> formatInt (Locale 1 "," ".") 1234567890
"1,234,567,890.0"
Locale to configure the format options.