1. 程式人生 > >[java]str.replaceAll(" ", "")替換空格不行

[java]str.replaceAll(" ", "")替換空格不行

str.replaceAll(" ", ""); //去掉所有空格,包括首尾、中間

  • 不行?
  • 全形半形空格

https://blog.csdn.net/qq_33210042/article/details/78087713

https://www.cnblogs.com/shuilangyizu/p/6612240.html

https://www.runoob.com/java/java