fork(2) download
  1. #include <iostream>
  2. #include <algorithm>
  3.  
  4. int main()
  5. {
  6. std::string s = "abc12df34";
  7. std::replace_if(s.begin(), s.end(), [](char c) { return isdigit(c); }, '#');
  8. std::cout << s << std::endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
abc##df##