給你一個字符串 S,請你刪去其中的所有元音字母( ‘a’,‘e’,‘i’,‘o’,‘u’),並返回這個新字符串。
來源:力扣(LeetCode)
鏈接:https://leetcode-cn.com/problems/remove-vowels-from-a-string/
著作權歸領釦網絡所有。商業轉載請聯繫官方授權,非商業轉載請註明出處。
public class Solution {
public string RemoveVowels(string S) {
string str=S.Replace("a","");
str=str.Replace("e","");
str=str.Replace("i","");
str=str.Replace("o","");
str=str.Replace("u","");
return str;
}
}