翻转字符串中的元音字母
class Solution {
public String reverseVowels(String s) {
if(s==null||s.length()==0)
return s;
String sss = "aeiouAEIOU";
char[] ss =s.toCharArray();
int i = 0;
int j = s.length()-1;
while(i<j){
while(i<j&&!sss.contains(ss[i]+""))
i++;
while(i<j&&!sss.contains(ss[j]+""))
j--;
char tag = ss[i] ;
ss[i] = ss[j];
ss[j] = tag;
i++;
j--;
}
return new String(ss);
}
}