Why is Swift counting this Grapheme Cluster as two characters instead of one?
问题 Generally Swift is really smart about counting grapheme clusters as a single character. If I want to make a Lebanese flag, for example, I can combine the two Unicode characters U+1F1F1 REGIONAL INDICATOR SYMBOL LETTER L U+1F1E7 REGIONAL INDICATOR SYMBOL LETTER B and as expected this is one character in Swift: let s = "\u{1f1f1}\u{1f1e7}" assert(s.characters.count == 1) assert(s.utf16.count == 4) assert(s.utf8.count == 8) However, let's say I want to make a Bicyclist emoji of Fitzpatrick Type