withCommas

fun withCommas(num: BigDecimal, isInteger: Boolean = false, scale: Int = 1): String(source)

Formats a BigDecimal to string with high amount of post-comma decimals

Return

Formatted number string

Parameters

num

Number to be formatted

isInteger

Whether to explicitly not include extra zeros

scale

Rounding scale of formatting