Trim String Characters With Boost Lambda
1#include <boost/algorithm/string.hpp>
2
3wstring s = L"\"quoted\"";
4
5boost::algorithm::trim_if(this->open_cmd,
6 [](auto& ch) { return ch == L'\"'; });
produces output quoted.
The beauty here is using C++11 lambdas with boost algorithms instead of static methods or function objects making syntax super short.

Have feedback or questions? Feel free to email me.