c++ string erase all occurrences
#include <algorithm> str.erase(std::remove(str.begin(), str.end(), 'a'), str.end());
Source: stackoverflow.com
#include <algorithm> str.erase(std::remove(str.begin(), str.end(), 'a'), str.end());