🤷♂️ Not sure why you'd need this.
Add packages... → enter url →
let emoji = await TextToEmoji.emoji(for: "tomato") // 🍅
This is an
async method that will
throw the error
noMatchFound if no emoji has been matched with the given text.
let shrimp = TextToEmoji.emoji(for: "shrimp", preferredCategory: .foodAndDrink) // 🍤
let shrimp = TextToEmoji.emoji(for: "shrimp", preferredCategory: .animalsAndNature) // 🦐
preferredCategory a certain emoji category can be given a higher priority. This can be very useful if the context of the search is known. For example, when looking for the word
shrimp, two matching emoji's could be:
.foodAndDrink as the
preferredCategory, the first match will be
.animalsAndNature would result in
EmojiCategory.swift for all categories.
Feel free to help me out here, especially with the localization.
|Last commit: 2 weeks ago|
First release of text-to-emoji. Still an early version with just
nl localizations with a heavy focus on the food and drink category which is needed for an upcoming app.