String str = " S-t_reet (Fullname) ".trim();
char[] chars = str.toCharArray();
char[] chars1 = new char[1];
StringBuffer buffer=new StringBuffer();
for(int i = 0; i < chars.length; i ++) {
if((chars[i] >= 19968 && chars[i] <= 40869) || (chars[i] >= 97 && chars[i] <= 122) || (chars[i] >= 65 && chars[i] <= 90)) {
// buffer.append(chars[i]);
if (chars[0] >= 'A' && chars[0] <= 'Z') {//当为字母时,则转换为小写
buffer.append(chars[i]);
}
}
}
System.out.print(s.toLowerCaseFirstOne(buffer.toString()));
// //首字母转小写
public String toLowerCaseFirstOne(String s){
if(Character.isLowerCase(s.charAt(0)))
return s;
else
return (new StringBuilder()).append(Character.toLowerCase(s.charAt(0))).append(s.substring(1)).toString();
}
// //首字母转大写
// public String toUpperCaseFirstOne(String s){
// if(Character.isUpperCase(s.charAt(0)))
// return s;
// else
// return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1)).toString();
// }