Skip to content

This javascript library allow you split emoji string. If you want to extend this project to work with almost Unicode strings, you just need to extend the data file.

License

Notifications You must be signed in to change notification settings

thanhdnh/emoji-splitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emojiSplit

This javascript library allows you perform splitting emoji string. If you want to extend this project to work with almost unicode string, you just need to extend the data file (append data into emoji.json).
You can make emoji string here to test https://www.emojionline.org
Online test here https://thanhdnh.github.io/emoji-splitter/
======================
*Required library: jquery.
*Required other data: emoji.json.
----------------------
In order to use this library, you need:

  1. Include jquery library before including this library.
  2. In your code editor, at the point you want to split emojis string, you need to do as following
    var emojisplit = new EmojiSplit().create();
    var result = emojisplit.splitBySymbol('I ❤ you 💏', '//');
    Hints:
  • You need call the method create before using splitBySymbol method.
  • The splitBySymbol method has two parameters: the first parameter is input emoji string that you need split, the second parameter is the pattern symbol that you want to separate (this parameter is optional). This symbol need no appear in your emoji string. You can choose any symbols you want, just mismatch with any symbols in your input emoji string.
    =======================
    Here are some examples:
    I ❤ you 💏 ==> I ,❤, you ,💏
    This 🎄🎅🏼, my 👨‍👩‍👧‍👦 will go to 🗽 ==> This ,🎄,🎅🏼,, my ,👨‍👩‍👧‍👦, will go to ,🗽
    👨🏾‍🎓👷🏿👸🏻👢👨‍👨‍👦👩‍👩‍👦💑🤦🏼🙋 ==> 👨🏾‍🎓,👷🏿,👸🏻,👢,👨‍👨‍👦,👩‍👩‍👦,💑,🤦🏼,🙋

This library works well on allmost browsers.

About

This javascript library allow you split emoji string. If you want to extend this project to work with almost Unicode strings, you just need to extend the data file.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published