format

@JvmOverloads
fun Number.format(pattern: String = "#,###.##"): String

Format numbers with given pattern.

Example:

123456789.format() // 1,234,567,890

Since

1.1.0

Return

format number.

Parameters

pattern

default pattern is comma separator.

See also