lucee.Componentcontentbox.modules.contentbox-deps.modules.cbmarkdown.modules.cbemoji.models.EmojiService
Emoji Service
Property Summary | ||||
---|---|---|---|---|
type | property | default | serializable | required |
any
|
emojimap
The emoji map holder.
|
true
|
false
|
Constructor Summary | |
---|---|
init()
Constructor. |
Method Summary | |
---|---|
any
|
emojify(any target, [any onMissing])
Takes in a string and replaces :emojikey: inside of it with the right emojis. |
private any
|
ensureColons(any target)
Ensure :string: colon patterns are returned. |
any
|
get(any emoji)
Returns an emoji code and displays on terminals that support it. |
any
|
getByKey(any emoji)
Get an emoji by clean key, if not found, it just returns the key back. |
string
|
getEmojimap()
|
any
|
hasEmoji(any nameOrCode)
Check if an emoji exists in this library either by key name or :name: pattern. |
any
|
hasEmojiByCode(any code)
Check if you have an emoji by code. |
any
|
hasEmojiByName(any name)
Check if you have an emoji by key or :key:. |
struct
|
random()
Get a random emoji. |
struct
|
search(any target)
Return a struct of potential emoji matches. |
any
|
setEmojimap(any emojimap)
|
private any
|
stripColons(any target)
Strip :emoji: colons from the text. |
private any
|
stripNSB(any code)
Remove the non-spacing-mark from the code, never send a stripped version to the client, as it kills graphical emoticons. |
any
|
unemojify(any target)
Unemojify a string. |
any
|
which(any code, [boolean includeColons='false'])
Pass in the emoji unicode and get the name, else empty string if not found. |
Methods inherited from class lucee.Component |
---|
None |
Constructor Detail |
---|
Constructor
Property Detail |
---|
The emoji map holder
access
- publicrequired
- falsereturntype
- anyserializable
- trueMethod Detail |
---|
Takes in a string and replaces :emojikey: inside of it with the right emojis
target
- The string to emojifyonMissing
- Closure called if the emoji requested does not exist, return what you want to display.Ensure :string: colon patterns are returned
target
- the incoming target to wrap in ::Returns an emoji code and displays on terminals that support it The emoji can be a direct key or a github flavored markup emoji: http://www.emoji-cheat-sheet.com/)
emoji
- The emoji keyGet an emoji by clean key, if not found, it just returns the key back This does not use the github flavored markup emoji key.
emoji
- The emoji keyCheck if an emoji exists in this library either by key name or :name: pattern
nameOrCode
- The key name or the :code: nameCheck if you have an emoji by code
code
- The codeCheck if you have an emoji by key or :key:
name
- The nameGet a random emoji
Return a struct of potential emoji matches
target
- The search string to searchemojimap
Strip :emoji: colons from the text
target
- The target stringRemove the non-spacing-mark from the code, never send a stripped version to the client, as it kills graphical emoticons.
code
- The code to inspectUnemojify a string
target
- The string to unemojifyPass in the emoji unicode and get the name, else empty string if not found.
code
- The emoji unicodeincludeColons
- Wrap the word in colons or just by key