I need to truncate a string
after an underscore.
Example:-
std::wstring name = L"Steve_Smith";
trim_right_if(name, is_any_of(L"_"));
The trim_right_if is not working, the name remains the same after its execution.
Is there a way using boost::regex
?
Yes, i am trying not to use find_first_of
and substr
, which i know works.