C++中Trim的方法,其实也是写的很Trick的……
参考:http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring
#include <stringstream>
void trim(::std::string & str)
{
//left
str.erase(str.begin(), std::find_if(str.begin(),[......]
C++中Trim的方法,其实也是写的很Trick的……
参考:http://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring
#include <stringstream>
void trim(::std::string & str)
{
//left
str.erase(str.begin(), std::find_if(str.begin(),[......]