4 ms·
Swift is not the only language which recognizes it as a single grapheme, Erlang does as well: > string:length(" ️"). 1 Indeed it considers it as a singl
by rdtsc 7y ago
Swift is not the only language which recognizes it as a single grapheme, Erlang does as well:
> string:length(" ️").
1
Indeed it considers it as a single grapheme made of 5 code points:
> string:to_graphemes(" ️").
[[129318,127996,8205,9794,65039]]
EDIT: Pasting from the terminal into the comment box on HN somehow replaced the emoji with a single blank.
- Thorrez 7y agoHN bans most emoji. That's pretty annoying on a post like this. https://news.ycombinator.com/item?id=17508962 https://news.ycombinator.com/item?id=17508962 https://news.ycombinator.com/item?id=19482991 https://news.ycombinator.com/item?id=19482991
- masklinn 7y ago> HN bans most emoji. That's pretty annoying on a post like this. Not just "emoji" either, it bans random codepoints it doesn't consider "textual" enough and rather than tell you they're just removed from the comment when submitting leaving you to find out your comment is completely broken. It's infuriating.
- deleted 7y ago[deleted]