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

commonMain.ru.casperix.multiplatform.font.localize.CharacterExpandByLocale.kt Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package ru.casperix.multiplatform.font.localize


class CharacterExpandByLocale {
	fun expand(characters: Set): Set {
		val filteredAlphabets = CharacterSets.all.filter { alphabet ->
			characters.firstNotNullOfOrNull { char ->
				if (alphabet.charSet.contains(char)) char else null
			} != null
		}

		var output = emptySet()
		filteredAlphabets.forEach { alphabet ->
			output = output + alphabet.charSet
		}
		return output + characters + CharacterSets.COMMON_CHARACTER_SET
	}

}







© 2015 - 2024 Weber Informatics LLC | Privacy Policy