Splits the string into an array of extended grapheme clusters that approximate user-perceived characters.
In other words, this function splits a string into characters, preserving emoji and other complex characters.
graphemes(string)
string
The string to split.
An array of strings.
graphemes("Hello, こんにちは, 👩🏾🦰")
["H","e","l","l","o",","," ","こ","ん","に","ち","は",","," ","👩🏾🦰"]
graphemes("a👨👩👧👦b")
[ "a", "👨👩👧👦", "b" ]
// Compare to:
[..."a👨👩👧👦b"]
[ "a", "👨", "", "👩", "", "👧", "", "👦", "b" ]