This has to do with how the
String type works in Swift, and how the
contains(_:) method works.
The ‘👩👩👧👦 ‘ is what’s known as an emoji sequence, which is rendered as one visible character in a string. The sequence is made up of
Character objects, and at the same time it is made up of
If you check the character count of the string, you’ll see that it is made up of four characters, while if you check the unicode scalar count, it will show you…