Deviopath › Go

Count Vowels

Easy · Strings

Range over the string as runes. strings.ContainsRune("aeiou", r) tests membership. Convert to lowercase first so "A" counts.

Write CountVowels(s) that returns how many vowels (a e i o u, any case) are in s.

Next: Palindrome