#include <iostream>
#include <string>
#include <algorithm>
#include <ctype.h> // for http://w...content-available-to-author-only...s.com/reference/cctype/isdigit/
int main()
{
std::string str = "HelloTheir453Their54Hello" ;
// loop
for( char& c : str ) if( ::isdigit(c) ) c = '*' ;
std::cout << str << '\n' ;
str = "cvvc2hvc7r6464677VJVJvju78uR&R56fuvfcJv" ;
// algorithm http://w...content-available-to-author-only...s.com/reference/algorithm/replace_if/
std::replace_if( str.begin(), str.end(), ::isdigit, '*' ) ;
std::cout << str << '\n' ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8Y3R5cGUuaD4gLy8gZm9yIGh0dHA6Ly93Li4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5zLmNvbS9yZWZlcmVuY2UvY2N0eXBlL2lzZGlnaXQvCgppbnQgbWFpbigpCnsKICAgIHN0ZDo6c3RyaW5nIHN0ciA9ICJIZWxsb1RoZWlyNDUzVGhlaXI1NEhlbGxvIiA7CgogICAgLy8gbG9vcAogICAgZm9yKCBjaGFyJiBjIDogc3RyICkgaWYoIDo6aXNkaWdpdChjKSApIGMgPSAnKicgOwogICAgc3RkOjpjb3V0IDw8IHN0ciA8PCAnXG4nIDsKCiAgICBzdHIgPSAiY3Z2YzJodmM3cjY0NjQ2NzdWSlZKdmp1Nzh1UiZSNTZmdXZmY0p2IiA7CgogICAgLy8gYWxnb3JpdGhtIGh0dHA6Ly93Li4uY29udGVudC1hdmFpbGFibGUtdG8tYXV0aG9yLW9ubHkuLi5zLmNvbS9yZWZlcmVuY2UvYWxnb3JpdGhtL3JlcGxhY2VfaWYvCiAgICBzdGQ6OnJlcGxhY2VfaWYoIHN0ci5iZWdpbigpLCBzdHIuZW5kKCksIDo6aXNkaWdpdCwgJyonICkgOwogICAgc3RkOjpjb3V0IDw8IHN0ciA8PCAnXG4nIDsKfQo=