StringBuilder builder=new StringBuilder(); for (int i=0;i<newName.length();i++){ char ch= newName.charAt(i); if(ch>='0'&&ch<='9'||ch>='a'&&ch<='z'||ch>='A'&&ch<='Z'|| ch >= 0x4E00 && ch <= 0x9FA5) builder.append(ch); } newName=builder.toString();
去除字符中非中文、数字、字母
最新推荐文章于 2024-08-21 20:44:22 发布