众所周知,string字符串去除空格的方法有trim()和replace(),区别在于trim()去首尾的空格,但是不能去中间的,而replace可以去除所有的空格。
结果为"a b c"。
结果为“abc”。
string去空格
原文:http://www.cnblogs.com/douglas0126x/p/4957451.html