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

commonMain.symbols.punctuation._allPunctuation.kt Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package org.kodein.emoji.symbols.punctuation

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


internal fun EmojiFinder.addAllPunctuation() {
    add(intArrayOf(0x2755), _WhiteExclamationMark)
    add(intArrayOf(0x2757), _RedExclamationMark)
    add(intArrayOf(0x2754), _WhiteQuestionMark)
    add(intArrayOf(0x2753), _RedQuestionMark)
    add(intArrayOf(0x2049, 0xfe0f), _ExclamationQuestionMark)
    add(intArrayOf(0x2049), _ExclamationQuestionMark)
    add(intArrayOf(0x203c, 0xfe0f), _DoubleExclamationMark)
    add(intArrayOf(0x203c), _DoubleExclamationMark)
    add(intArrayOf(0x3030, 0xfe0f), _WavyDash)
    add(intArrayOf(0x3030), _WavyDash)
}

internal fun MutableList.addAllPunctuation() {
    add(_WhiteExclamationMark)
    add(_RedExclamationMark)
    add(_WhiteQuestionMark)
    add(_RedQuestionMark)
    add(_ExclamationQuestionMark)
    add(_DoubleExclamationMark)
    add(_WavyDash)
}

/**
 * All Emoji of the Symbols: punctuation 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.allPunctuation(): List =
    ArrayList(7).apply { addAllPunctuation() }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy