public class EmojiParser extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
EmojiParser.FitzpatrickAction
Enum used to indicate what should be done when a Fitzpatrick modifier is found.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
parseToAliases(String input)
See
parseToAliases(String, FitzpatrickAction) with the action "PARSE" |
static String |
parseToAliases(String input,
EmojiParser.FitzpatrickAction fitzpatrickAction)
Replaces the emoji's unicode occurrences by one of their alias (between 2 ':').
Example: 😄 will be replaced by :smile:When a fitzpatrick modifier is present with a PARSE action, a "|" will be appendend to the alias, with the fitzpatrick type. Example: 👦🏿 will be replaced by :boy|type_6:The fitzpatrick types are: type_1_2, type_3, type_4, type_5, type_6 When a fitzpatrick modifier is present with a REMOVE action, the modifier will be deleted. Example: 👦🏿 will be replaced by :boy:When a fitzpatrick modifier is present with a IGNORE action, the modifier will be ignored. Example: 👦🏿 will be replaced by :boy:🏿 |
static String |
parseToHtmlDecimal(String input)
See
parseToHtmlDecimal(String, FitzpatrickAction) with the action "PARSE" |
static String |
parseToHtmlDecimal(String input,
EmojiParser.FitzpatrickAction fitzpatrickAction)
Replaces the emoji's unicode occurrences by their html representation.
Example: 😄 will be replaced by 😄When a fitzpatrick modifier is present with a PARSE or REMOVE action, the modifier will be deleted from the string. Example: 👦🏿 will be replaced by 👦When a fitzpatrick modifier is present with a IGNORE action, the modifier will be ignored and will remain in the string. Example: 👦🏿 will be replaced by 👦🏿 |
static String |
parseToHtmlHexadecimal(String input)
See
parseToHtmlHexadecimal(String, FitzpatrickAction) with the action "PARSE" |
static String |
parseToHtmlHexadecimal(String input,
EmojiParser.FitzpatrickAction fitzpatrickAction)
Replaces the emoji's unicode occurrences by their html hex representation.
Example: 👦 will be replaced by 👦When a fitzpatrick modifier is present with a PARSE or REMOVE action, the modifier will be deleted. Example: 👦🏿 will be replaced by 👦When a fitzpatrick modifier is present with a IGNORE action, the modifier will be ignored and will remain in the string. Example: 👦🏿 will be replaced by 👦🏿 |
static String |
parseToUnicode(String input)
Replaces the emoji's aliases (between 2 ':') occurrences and the html representations by their unicode.
Examples: :smile: will be replaced by 😄😄 will be replaced by 😄:boy|type_6: will be replaced by 👦🏿 |
public static String parseToAliases(String input)
parseToAliases(String, FitzpatrickAction) with the action "PARSE"input - the string to parsepublic static String parseToAliases(String input, EmojiParser.FitzpatrickAction fitzpatrickAction)
😄 will be replaced by :smile:👦🏿 will be replaced by :boy|type_6:👦🏿 will be replaced by :boy:👦🏿 will be replaced by :boy:🏿input - the string to parsefitzpatrickAction - the action to apply for the fitzpatrick modifierspublic static String parseToUnicode(String input)
:smile: will be replaced by 😄😄 will be replaced by 😄:boy|type_6: will be replaced by 👦🏿input - the string to parsepublic static String parseToHtmlDecimal(String input)
parseToHtmlDecimal(String, FitzpatrickAction) with the action "PARSE"input - the string to parsepublic static String parseToHtmlDecimal(String input, EmojiParser.FitzpatrickAction fitzpatrickAction)
😄 will be replaced by 😄👦🏿 will be replaced by 👦👦🏿 will be replaced by 👦🏿input - the string to parsefitzpatrickAction - the action to apply for the fitzpatrick modifierspublic static String parseToHtmlHexadecimal(String input)
parseToHtmlHexadecimal(String, FitzpatrickAction) with the action "PARSE"input - the string to parsepublic static String parseToHtmlHexadecimal(String input, EmojiParser.FitzpatrickAction fitzpatrickAction)
👦 will be replaced by 👦👦🏿 will be replaced by 👦👦🏿 will be replaced by 👦🏿input - the string to parsefitzpatrickAction - the action to apply for the fitzpatrick modifiersCopyright © 2015. All rights reserved.