TestsTested | β |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Jan 2016 |
SPMSupports SPM | β |
Maintained by Todd Kramer.
Tools for detecting emoji in strings and using emoji shortcut codes.
Since EmojiTools is a dynamic framework, iOS 8 or above is required
To install EmojiTools manually:
Emoji Detection:
import EmojiTools
func someFunction() {
let emojiContainingString = "This πππ©βπ©βπ§βπ§ string π²π―π has πβοΈπ» a πππΌ lot ππ½βοΈ of ππ¦βοΈ emoji. 8οΈβ£π‘π"
let containsEmoji = emojiContainingString.containsEmoji() // true
let emojiOnlyWhitespaceString = "πππ©βπ©βπ§βπ§ π²π―π πβοΈπ» πππΌ ππ½βοΈ ππ¦βοΈ 8οΈβ£π‘π"
let containsEmojiOnly = emojiOnlyWhitespaceString.containsEmojiOnly() // true
let containsEmojiOnlyAndNoWhitespace = emojiOnlyWhitespaceString.containsEmojiOnly(false) // false
}
Emoji Shortcut Codes
import EmojiTools
func someFunction() {
let emojiShortcutCodeString = "The :monkey: is trying to buy a :banana: with some :moneybag: at the :convenience_store:."
let processedEmojiString = emojiShortcutCodeString.emojiString() // "The π is trying to buy a π with some π° at the πͺ."
}
EmojiTools is available under the MIT license. See the full license here.