str.replaceAll(" ", ""); //去掉全部空格,包括首尾、中間html
https://blog.csdn.net/qq_33210042/article/details/78087713java
https://www.cnblogs.com/shuilangyizu/p/6612240.htmlui
https://www.runoob.com/java/java-string-trim.html.net