Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) boost::algorithm::trim_left

 

boost::algorithm::trim_left is a Boost std::string algorithm to trim whitespace away from the left side of a std::string.

 

#include <cassert>
#include <boost/algorithm/string/trim.hpp>

int main()
{
  std::string s = " \t \n x";
  boost::algorithm::trim_left(s);
  assert(s=="x");
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict