public static void main(String[] args) {
String str = "测试abc def ";
System.out.println(str.trim());
str=str.replace((char)12288, ' ');
System.out.println(str);
System.out.println(str.trim());
}
去掉全角空格
最新推荐文章于 2023-10-31 20:35:57 发布
public static void main(String[] args) {
String str = "测试abc def ";
System.out.println(str.trim());
str=str.replace((char)12288, ' ');
System.out.println(str);
System.out.println(str.trim());
}