Created
February 17, 2022 08:13
-
-
Save jonrysimbolon/012228823e0c8f1f776370aeacabcd93 to your computer and use it in GitHub Desktop.
format rupiah
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun formatRupiah(number: Double): String { | |
val localeID = Locale("in", "ID") | |
val formatRupiah = NumberFormat.getCurrencyInstance(localeID) | |
return formatRupiah.format(number) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment