Updated the uppercase and lowercase

This commit is contained in:
Sambo Chea 2022-12-16 20:49:57 +07:00
parent 6deb73600d
commit 9b328c93c7
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
4 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@ open class MoneyCurrency(
private var configs: Map<String, Any?>? = null,
) : Serializable, StdMoney.Currency {
override fun getCurrency(): String {
return name.toUpperCase().trim()
return name.uppercase().trim()
}
fun getSymbol(): String? {

View File

@ -8,7 +8,7 @@ infix fun StdMoney.exchangeTo(currency: StdMoney.Currency): StdMoney {
infix fun StdMoney.exchangeTo(currency: String): StdMoney = this exchangeTo object : StdMoney.Currency {
override fun getCurrency(): String {
return currency.toUpperCase().trim()
return currency.uppercase().trim()
}
}
@ -69,7 +69,7 @@ infix fun Number.withCurrency(currency: StdMoney.Currency): StdMoney = object :
infix fun Number.withCurrency(currency: String): StdMoney = this withCurrency object : StdMoney.Currency {
override fun getCurrency(): String {
return currency.toUpperCase().trim()
return currency.uppercase().trim()
}
}

View File

@ -105,7 +105,7 @@ open class MoneyObject(
if (temp.length == 1) {
operator(temp[0])
} else {
valueOf(temp.toUpperCase().trim())
valueOf(temp.uppercase().trim())
}
}
is Char -> {

View File

@ -60,7 +60,7 @@ interface StdMoney : MoneyMixin {
fun initCurrency(currency: String?): Currency {
return object : Currency {
override fun getCurrency(): String {
return currency?.toUpperCase()?.trim() ?: "USD"
return currency?.uppercase()?.trim() ?: "USD"
}
}
}