toThousands

Formats a number with thousands separators. Example: 1234567.toThousands() → "1,234,567"


See also


fun Double.toThousands(decimals: Int = 2): String(source)

Formats a Double with thousands separators and fixed decimal places. Example: 1234567.89.toThousands(2) → "1,234,567.89"