All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.de.comahe.i18n4k.messages.NameToIndexMapperMap.kt Maven / Gradle / Ivy

Go to download

i18n4k is a multiplatform (JVM, JS, native) library and code generator for Kotlin to handle internationalisation (i18n) in your program.

The newest version!
package de.comahe.i18n4k.messages

/** For message strings that only contain numbers as parameter names */
class NameToIndexMapperMap(private val map: Map) : NameToIndexMapper {

    constructor(vararg entries: Pair) : this(mapOf(*entries))

    override fun getNameIndex(name: CharSequence): Int {
        return map[name] ?: -1
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy