Updated on 2026-08-14
This commit is contained in:
parent
3e5ab44b4c
commit
9505a1404b
26 changed files with 576 additions and 542 deletions
|
|
@ -25,7 +25,7 @@ fun BigDecimal.toFormattedString(
|
|||
@Suppress("MagicNumber")
|
||||
fun BigDecimal.toFormattedCurrencyString(
|
||||
decimals: Int,
|
||||
currency: String,
|
||||
currency: String? = null,
|
||||
roundingMode: RoundingMode = RoundingMode.DOWN,
|
||||
limitNumberOfDecimals: Boolean = true,
|
||||
): String {
|
||||
|
|
@ -38,7 +38,8 @@ fun BigDecimal.toFormattedCurrencyString(
|
|||
decimals = decimalsForRounding,
|
||||
roundingMode = roundingMode,
|
||||
)
|
||||
return "$formattedAmount $currency"
|
||||
val formattedCurrency = currency?.let { " $it " } ?: ""
|
||||
return "$formattedAmount$formattedCurrency"
|
||||
}
|
||||
|
||||
fun BigDecimal.toFiatString(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue