macosX64Main.common.Currency.objc.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fluid-stdlib-macosx64 Show documentation
Show all versions of fluid-stdlib-macosx64 Show documentation
Potentially useful Kotlin standard library additions
The newest version!
package com.github.fluidsonic.fluid.stdlib
import platform.Foundation.*
import platform.Foundation.NSLocale as PlatformLocale
actual fun Currency.name(locale: Locale) =
locale.toPlatform().localizedStringForCurrencyCode(code) ?: code
internal actual object Currency_Static {
@Suppress("UNCHECKED_CAST")
actual val allCurrencyCodes: Set = (PlatformLocale.ISOCurrencyCodes as List).toHashSet()
}