
commonMain.travel_places.place_map._allPlaceMap.kt Maven / Gradle / Ivy
package org.kodein.emoji.travel_places.place_map
import org.kodein.emoji.Emoji
import org.kodein.emoji.EmojiFinder
import org.kodein.emoji.addSt1Variations
import org.kodein.emoji.addSt2Variations
internal fun EmojiFinder.addAllPlaceMap() {
add(intArrayOf(0x1f30d), _GlobeShowingEuropeAfrica)
add(intArrayOf(0x1f30e), _GlobeShowingAmericas)
add(intArrayOf(0x1f30f), _GlobeShowingAsiaAustralia)
add(intArrayOf(0x1f310), _GlobeWithMeridians)
add(intArrayOf(0x1f5fa, 0xfe0f), _WorldMap)
add(intArrayOf(0x1f5fa), _WorldMap)
add(intArrayOf(0x1f5fe), _MapOfJapan)
add(intArrayOf(0x1f9ed), _Compass)
}
internal suspend fun SequenceScope.yieldAllPlaceMap() {
yield(_GlobeShowingEuropeAfrica)
yield(_GlobeShowingAmericas)
yield(_GlobeShowingAsiaAustralia)
yield(_GlobeWithMeridians)
yield(_WorldMap)
yield(_MapOfJapan)
yield(_Compass)
}
internal val countPlaceMap = 7
/**
* All Emoji of the Travel & Places: place-map subgroup.
*/
public fun Emoji.Companion.sequencePlaceMap(): Sequence =
sequence { yieldAllPlaceMap() }
/**
* All Emoji of the Travel & Places: place-map subgroup.
*
* WARNING: This can be quite heavy to construct.
* This method should be called in background and its result should be cached.
*/
public fun Emoji.Companion.listPlaceMap(): List =
ArrayList(countPlaceMap).also { list -> sequencePlaceMap().forEach { list.add(it) } }
@Deprecated("Renamed listPlaceMap.", replaceWith = ReplaceWith("listPlaceMap()"), level = DeprecationLevel.WARNING)
public fun Emoji.Companion.allPlaceMap(): List =
listPlaceMap()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy