I tried with this code:
let vowels: [Character] = ["a","e","i","o","u", "y"]
let replaced = String(myString.map {
$0 == vowels.contains($0) ? "1" : "0"
})
But I have the error:
Binary operator '==' cannot be applied to operands of type 'Character' and 'Bool'
What is wrong?