// struct check{ bool operator()(char c){ return std::isalpha(c)|| std::isdigit(c); } }; std::string reduce_copy(std::string const &s){ std::string cpy; return std::remove_copy_if(s.begin(), s.end(), std::back_inserter(cpy), check()); } std::string reduceString(std::string const & s) { std::string s2 = ""; int len = s.size(); int c; for ( int i = 0; i