EmojiManager

class EmojiManager : IEmojiManager

Holds the loaded emojis and provides search functions.

Author

vdurmont@gmail.com

Parameters

emojiList

complete list of all emojis

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val emojiList: Collection<IEmoji>

Functions

Link copied to clipboard
Link copied to clipboard
open override fun getAllTags(): Collection<String>

Returns all the tags in the database

Link copied to clipboard
open override fun getByUnicode(unicode: String?): IEmoji?

Returns the IEmoji for a given unicode.

Link copied to clipboard
open override fun getForAlias(alias: String?): IEmoji?

Returns the IEmoji for a given alias.

Link copied to clipboard
open override fun getForTag(tag: String?): Collection<IEmoji>?

Returns all the IEmojis for a given tag.

Link copied to clipboard
open override fun isEmoji(sequence: CharArray): Matches

Checks if sequence of chars contain an emoji.

open override fun isEmoji(string: String?): Boolean

Tests if a given String is an emoji.

Link copied to clipboard
open override fun isOnlyEmojis(string: String?): Boolean

Tests if a given String only contains emojis.

Link copied to clipboard

Detects all unicode emojis in input string and replaces them with the return value of transformer.transform()

Link copied to clipboard
fun EmojiManager.parseToAliases(input: String, fitzpatrickAction: FitzpatrickAction = FitzpatrickAction.PARSE): String

Replaces the emoji's unicode occurrences by one of their alias (between 2 ':').

Link copied to clipboard
fun EmojiManager.parseToHtmlDecimal(input: String, fitzpatrickAction: FitzpatrickAction = FitzpatrickAction.PARSE): String

Replaces the emoji's unicode occurrences by their html representation.

Link copied to clipboard
fun EmojiManager.parseToHtmlHexadecimal(input: String, fitzpatrickAction: FitzpatrickAction = FitzpatrickAction.PARSE): String

Replaces the emoji's unicode occurrences by their html hex representation.

Link copied to clipboard

Replaces the emoji's aliases (between 2 ':') occurrences and the html representations by their unicode.

Link copied to clipboard

Removes all emojis from a String

Link copied to clipboard

Removes all the emojis in a String except a provided set

Link copied to clipboard

Removes a set of emojis from a String

Link copied to clipboard
fun EmojiManager.replaceAllEmojis(str: String, replacementString: String): String

Replace all emojis with character

Link copied to clipboard
@VisibleForTesting(otherwise = 2)
fun trimAlias(alias: String): String