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

commonMain.objects.medical._allMedical.kt Maven / Gradle / Ivy

package org.kodein.emoji.objects.medical

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


internal fun EmojiFinder.addAllMedical() {
    add(intArrayOf(0x1f489), _Syringe)
    add(intArrayOf(0x1fa78), _DropOfBlood)
    add(intArrayOf(0x1f48a), _Pill)
    add(intArrayOf(0x1fa79), _AdhesiveBandage)
    add(intArrayOf(0x1fa7c), _Crutch)
    add(intArrayOf(0x1fa7a), _Stethoscope)
    add(intArrayOf(0x1fa7b), _XRay)
}

internal suspend fun SequenceScope.yieldAllMedical() {
    yield(_Syringe)
    yield(_DropOfBlood)
    yield(_Pill)
    yield(_AdhesiveBandage)
    yield(_Crutch)
    yield(_Stethoscope)
    yield(_XRay)
}

internal val countMedical = 7

/**
 * All Emoji of the Objects: medical subgroup.
*/
public fun Emoji.Companion.sequenceMedical(): Sequence =
    sequence { yieldAllMedical() }

/**
 * All Emoji of the Objects: medical 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.listMedical(): List =
    ArrayList(countMedical).also { list -> sequenceMedical().forEach { list.add(it) } }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy