Swift countElements() return incorrect value when count flag emoji

Update for Swift 4 (Xcode 9) As of Swift 4 (tested with Xcode 9 beta) grapheme clusters break after every second regional indicator symbol, as mandated by the Unicode 9 standard: let str1 = “🇩🇪🇩🇪🇩🇪🇩🇪🇩🇪” print(str1.count) // 5 print(Array(str1)) // [“🇩🇪”, “🇩🇪”, “🇩🇪”, “🇩🇪”, “🇩🇪”] Also String is a collection of its characters (again), so … Read more