remove_if should work great like kuphryn said, but there is something to take notice of. You will also need to use the string's own erase member function along with using remove_if. If you use remove_if by itself, you will not get what you expected.
Code:
#include <string>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
...
string data = "blah blah blah";
// Remove all 'l' characters...
remove_if(data.begin(),data.end(),bind2nd(equal_to<char>(),'l'));
cout << data << endl;
The output in this case is: bah bah bahlah. Notice the extra lah at the end. Combine the return value from the remove_if function object and the string's own erase member function to get the desired output.
Code:
#include <string>
#include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
...
string data = "blah blah blah";
// Remove all 'l' characters...
data.erase(remove_if(data.begin(),data.end(),bind2nd(equal_to<char>(),'l')),data.end());
cout << data << endl;
And now we get the desired output: bah bah bah