Shirlies
宁静专注认真的程序媛~
摘要: c++去掉首尾空格是参考一篇文章的,但是忘记文章出处了,就略过吧。去掉首尾空格的代码如下: 1 void trim(string &s) 2 { 3 4 if( !s.empty() ) 5 { 6 s.erase(0,s.find_first_not_of(" "... 阅读全文
posted @ 2015-07-22 11:06 Shirlies 阅读(49318) 评论(1) 推荐(0) 编辑