std::string line = " hello world ";
boost::algorithm::trim(line);
Tuesday, December 21, 2010
Removing leading and trailing whitespace in C++
If you have the boost library installed, its simply a one liner
Labels:
boost,
c++,
remove whitespace,
tips,
whitespace
Subscribe to:
Posts (Atom)