string去除2端空格 代码 static const String delims = " \t\r " ; str.erase(str.find_last_not_of(delims) + 1 ); // trim right str.erase( 0 , str.find_first_not_of(delims)); // trim left posted on 2009-11-27 09:33 迈克老狼 阅读( ...) 评论( ...) 编辑 收藏 转载于:https://www.cnblogs.com/mikewolf2009/archive/2009/11/27/1611768.html