DEV Community

Discussion on: Daily Challenge #3 - Vowel Counter

Collapse
 
andreasjakof profile image
Andreas Jakof
private static List<char> vowels = new List<char>('e','a','i','o','u','E','A','I','O','U');

public static int VowelCount(this string str) => 
    str.Count(c => vowels.Contains(c));