Closed
Description
Previous ID | SR-3582 |
Radar | None |
Original Reporter | S2dent (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Invalid |
Environment
MacOSX iOS
Additional Detail from JIRA
Votes | 0 |
Component/s | Standard Library |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 3ed43ec703bc4462ba30ecf03b6067e2
is duplicated by:
- SR-4077 Consecutive flag emoji are treated as a single character
relates to:
- SR-6076 [String]
var count: String.CharacterView.IndexDistance { get }
returns a wrong value on Linux when "Regional Indicator Symbols" are contained.
Issue Description:
Flags are not distinguished in characters.count
Example:
// Here are three country flags emojis
let flags = "\u{1F1E6}\u{1F1E8}\u{1F1F7}\u{1F1F4}\u{1F1F7}\u{1F1FA}"
flags.characters.count // 1
No matter how many flags, or in which order, the result is always 1.