News for hackers. Stuff that matters.
Re:Why Is Swift's String API So Hard? by mikeash on Friday November 06, 2015 @11:52AM (#10520410)
Right, stupid me, emoji are still a single code point. Put a flag in the box, and the count decreases by two.
Re:Why Is Swift's String API So Hard? by TazeTSchnitzel on Friday November 06, 2015 @03:44PM (#10521899)
Well, depends on the emoji. Some use combing characters, e.g. a red heart is the black heart character plus some invisible joiner IIRC, and some of the family emoji are composed of their individual components (mom/dad/girl/boy) with joiners.
Re:Why Is Swift's String API So Hard? by mikeash on Friday November 06, 2015 @04:22PM (#10522125)
Yes, you're right. In a fit of silliness I was testing only with the ones that are a single code point, though.