Answers for "remove all occurences of a char in a string in cpp"

C++
0

c++ string erase all occurrences

#include <algorithm>
str.erase(std::remove(str.begin(), str.end(), 'a'), str.end());
Posted by: Guest on November-20-2021
2

delete one specific character in string C++

#include <algorithm>
str.erase(std::remove(str.begin(), str.end(), 'a'), str.end());
Posted by: Guest on September-24-2020

Code answers related to "remove all occurences of a char in a string in cpp"

Browse Popular Code Answers by Language