Perhaps something like:
Code:
int remove_string(char* in_str, string remove_str)
{
std::string res_str(in_str);
int i;
if(!strstr(in_str, remove_str.c_str()))
return 0;
while(string::npos != (i=res_str.find(remove_str)))
res_str.replace(i, remove_str.length(), remove_str);
return 1;
}