啥也不说,就是好用,代码很简单,不解释!
string deleteAllMarks(string& str, const string& mark){
size_t len = mark.length();
while (1){
size_t pos = str.find(mark);
if (pos == string::npos){
return str;
}
str.erase(pos, len);
}
}
啥也不说,就是好用,代码很简单,不解释!
string deleteAllMarks(string& str, const string& mark){
size_t len = mark.length();
while (1){
size_t pos = str.find(mark);
if (pos == string::npos){
return str;
}
str.erase(pos, len);
}
}