I'm just wondering how the (inverted) CharacterSet in Swift works.
Let's assume that I have the following two character sets:
let invertedNumbers = CharacterSet(charactersIn: "0123456789").inverted
let numbers = CharacterSet(charactersIn: "0123456789")
When I log both character sets with the print function like
print(numbers)
it shows the same in the console as with
print(invertedNumbers)
And that is
<CFCharacterSet Items(U+0030 U+0031 U+0032 U+0033 U+0034 U+0035 U+0036 U+0037 U+0038 U+0039)>
But how can they be the same at all? I'm very confused as they aren't really. When I ask the inverted one if it contains an "a", it says true. On the other hand the not inverted one says false. And I like the way it works, but is the logging of the inverted one not buggy then?