number
fun number(decimals: Int = 0, grouping: Boolean = true, locale: Locale = Locale.getDefault(), nullText: String = ""): (Any?) -> String(source)
Formats a Number with a fixed number of decimal places.
Parameters
decimals
Digits after the decimal separator. Values are rounded to fit, so 2 turns 1234.5 into 1,234.50 and 1234.567 into 1,234.57.
grouping
Whether to group thousands (1,234,567). Turn it off for identifiers that happen to be numbers, such as an order number.
locale
Decides the decimal and grouping separators.
null Text
What a null value renders as.