swift - How to check if string contains a certain character? -


i've been trying find can't. have code:

func ayylmao(vorno: string){     if (vorno.(whatever function finding string goes here)("a", "e", "i", "o", "u"))     {         print("input includes vowels")     } } 

but right @ if statement can't find check if characters in string.

like this:

let s = "hello" let ok = s.characters.contains {"aeiou".characters.contains($0)} // true 

Comments

Popular posts from this blog

Django REST Framework perform_create: You cannot call `.save()` after accessing `serializer.data` -

Why does Go error when trying to marshal this JSON? -