Can anyone suggest a way of stripping tab characters ( "\t"s ) from a string? CString or std::string.
So that "1E10 " for example becomes "1E10".
c++stringtabs
Can anyone suggest a way of stripping tab characters ( "\t"s ) from a string? CString or std::string.
So that "1E10 " for example becomes "1E10".
Best Solution
hackingwords' answer gets you halfway there. But
std::remove()
from<algorithm>
doesn't actually make the string any shorter -- it just returns an iterator saying "the new sequence would end here." You need to callmy_string().erase()
to do that: