Split emojis into emoji list.
> import Data.String.CodeUnits (toCharArray)
> toCharArray "ππ³οΈβππ¨π»βπΎβπΏ"
['οΏ½','οΏ½','οΏ½','οΏ½','οΈ','β','οΏ½','οΏ½','οΏ½','οΏ½','οΏ½','οΏ½','β','οΏ½','οΏ½','β','οΏ½','οΏ½']
> import Data.String.CodePoints (singleton, toCodePointArray)
> singleton <$> toCodePointArray "ππ³οΈβππ¨π»βπΎβπΏ"
["π","π³","οΈ","β","π","π¨","π»","β","πΎ","β","πΏ"]
> import Data.String.EmojiSplitter (splitEmoji)
> splitEmoji "ππ³οΈβππ¨π»βπΎβπΏ"
(Right ["π","π³οΈβπ","π¨π»βπΎ","βπΏ"])
β» Only emoji unicodes are supported.
Reference: UTS #51: Unicode Emoji #EBNF_and_Regex
bower install purescript-emoji-splitter
Module documentation is published on Pursuit.