public static String getSeg(String srcStr)
{
//String engs = "abcdefghijklmnopqrstuvwxyz0123456789";
StringBuffer sb = new StringBuffer();
for(int i=0; i
char s = srcStr.charAt(i);
if((s>='a'&&s<='z')||(s>='A'&&s<='Z')||(s>='0'&&s<='9'))
sb.append(s+"");
else if(s==' ')
continue;
else
sb.append(" "+s+" ");
}
return sb.toString().trim();
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)