We're a place where coders share, stay up-to-date and grow their careers.
In C#
public static readonly List<Char> LowerCaseVowels = new List<Char> {'a', 'e', 'i', 'o', 'u'}; public static bool IsLowerCaseVowel(this char c) => LowerCaseVowels.Contains(c); public static string RemoveVowels(string input) => new string(input.Where(c => !c.ToLowerInvariant().IsLowerCaseVowel()));
Or may be just
var cleaned = Regex.Replace(input,"[aeiou]", "", RegexOptions.IgnoreCase);
Nice One!
In C#
Or may be just
var cleaned = Regex.Replace(input,"[aeiou]", "", RegexOptions.IgnoreCase);
Nice One!