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

commonMain.smileys_emotion.cat_face._allCatFace.kt Maven / Gradle / Ivy

package org.kodein.emoji.smileys_emotion.cat_face

import org.kodein.emoji.Emoji
import org.kodein.emoji.EmojiFinder
import org.kodein.emoji.addSt1Variations
import org.kodein.emoji.addSt2Variations


internal fun EmojiFinder.addAllCatFace() {
    add(intArrayOf(0x1f63a), _GrinningCat)
    add(intArrayOf(0x1f638), _GrinningCatWithSmilingEyes)
    add(intArrayOf(0x1f639), _CatWithTearsOfJoy)
    add(intArrayOf(0x1f63b), _SmilingCatWithHeartEyes)
    add(intArrayOf(0x1f63c), _CatWithWrySmile)
    add(intArrayOf(0x1f63d), _KissingCat)
    add(intArrayOf(0x1f640), _WearyCat)
    add(intArrayOf(0x1f63f), _CryingCat)
    add(intArrayOf(0x1f63e), _PoutingCat)
}

internal suspend fun SequenceScope.yieldAllCatFace() {
    yield(_GrinningCat)
    yield(_GrinningCatWithSmilingEyes)
    yield(_CatWithTearsOfJoy)
    yield(_SmilingCatWithHeartEyes)
    yield(_CatWithWrySmile)
    yield(_KissingCat)
    yield(_WearyCat)
    yield(_CryingCat)
    yield(_PoutingCat)
}

internal val countCatFace = 9

/**
 * All Emoji of the Smileys & Emotion: cat-face subgroup.
*/
public fun Emoji.Companion.sequenceCatFace(): Sequence =
    sequence { yieldAllCatFace() }

/**
 * All Emoji of the Smileys & Emotion: cat-face 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.listCatFace(): List =
    ArrayList(countCatFace).also { list -> sequenceCatFace().forEach { list.add(it) } }

@Deprecated("Renamed listCatFace.", replaceWith = ReplaceWith("listCatFace()"), level = DeprecationLevel.WARNING)
public fun Emoji.Companion.allCatFace(): List =
    listCatFace()




© 2015 - 2025 Weber Informatics LLC | Privacy Policy