-
-
Save Pasanpr/26e6e6227e62b7330a09a825c02a612f to your computer and use it in GitHub Desktop.
Determine if a character is a vowel or not
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Character { | |
var isVowel: Bool { | |
let vowels: [Character] = ["a", "e", "i", "o", "u"] | |
return vowels.contains(self) | |
} | |
} |
IsaacRichardson
commented
Jul 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment