Hi,
It seams that the public func isSuperset(of other: CharacterSet) -> Bool
API gives inconsistent results for some emoji symbols when uses with and without prefix text. Here is a playground example:
import Foundation
let input1 = "🥀"
let input11 = "a🥀"
let input2 = "😀"
let input22 = "a😀"
let letters = CharacterSet.letters
print("'\(input1)' is part of 'CharacterSet.letters': \(letters.isSuperset(of: CharacterSet(charactersIn: input1)))") // Gives false
print("'\(input11)' is part of 'CharacterSet.letters': \(letters.isSuperset(of: CharacterSet(charactersIn: input11)))") // INCORRECT: Should give false, but it gives true
print("'\(input2)' is part of 'CharacterSet.letters': \(letters.isSuperset(of: CharacterSet(charactersIn: input2)))") // Gives false
print("'\(input22)' is part of 'CharacterSet.letters': \(letters.isSuperset(of: CharacterSet(charactersIn: input22)))") // Gives false
Output:
'🥀' is part of 'CharacterSet.letters': false
'a🥀' is part of 'CharacterSet.letters': true
'😀' is part of 'CharacterSet.letters': false
'a😀' is part of 'CharacterSet.letters': false
Has anyone observed this?