How can I remove this character \
from CString?
For Example: I have string with this content "this is\a string"
How can I remove \
from my string?
Thank you very much.
How can I remove this character \
from CString?
For Example: I have string with this content "this is\a string"
How can I remove \
from my string?
Thank you very much.
It's simple for a CString
:
cstr.Remove('\\');
#include <algorithm>
...
// Use replace with substitute a space in place of the \ char.
std::replace(my_string.begin(), my_string.end(), '\\', ' ');
// or remove it all together.
std::remove(my_string.begin(), my_string.end(), '\\')