January 11, 2015
A few weeks ago, I released a first version of emoji-java on maven central! The lightweight library helps you easily handle emojis in your code.
Find the code on Github and spread the world ;)
Some quick examples:
String str = "An 😀awesome 😃string with a few 😉emojis!";
String result = EmojiParser.parseToHtml(myString);
System.out.println(myString);
// Prints:
// "An 😀awesome 😃string with a few 😉emojis!"
String str = "An :grinning:awesome :smiley:string 😄with a few :wink:emojis!";
String result = EmojiParser.parseToUnicode(myString);
System.out.println(myString);
// Prints:
// "An 😀awesome 😃string 😄with a few 😉emojis!"
List<Emoji> emojis = EmojiManager.getForTag("happy");
// Iterate over the emojis!
The complete documentation is on Github an pull requests are welcome :)