Understood. But given the spread syntax was introduced in ~2015 I would have expected it to "gather the characters" together more intuitively. It looks like three boat characters, but "JavaScript" tells me there are four items. Water under bridge. Wondering about future APIs.
I don’t think segmentation of these emoji is particularly locale-specific.
-
-
FYI the sailboat includes a variation selector. It has no visible impact on the rendering of the grapheme as far as I can tell, so maybe it is a poor example.
-
Still, I need help writing an example. I used the https://gist.github.com/inexorabletash/8c4d869a584bcaa18514729332300356 … polyfill pasted into node, yet whatever locale I use, spreading grapheme segment iteration results in a length of 6. What is the way to count boats?
@mathias, we must give the boaters what they want! :-P - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.


'].length