include/StringUtils.hxx
// replace all occurrences of all characters in string a in s with string b
// e.g. noNumbers = strReplaceForAllCharsInA(input, "0123456789", "")
replace all occurrences of all characters in string a in s with string b
e.g. noNumbers = strReplaceForAllCharsInA(input, "0123456789", "")
replace all occurrences of all characters in string a in s with string b e . g . noNumbers = strReplaceForAllCharsInA ( input " 0123456789 " " " )
inline std::string replaceForAllCharsInA(const std::string &s, const std::string &a, const std::string &b)
{
	std::string result = s;
	for (int i = 0; i < (int)a.size(); ++i)
	{
		result = replace(result, a.substr(i, 1), b);
	}
	return result;
}
inline std :: string replaceForAllCharsInA ( const std :: string & s , const std :: string & a , const std :: string & b ) { std :: string result = s ; for ( int i = 0 ; i < ( int ) a . size ( ) ; ++ i ) { result = replace ( result , a . substr ( i , 1 ) , b ) ; } return result ; }
replace all occurrences of all characters in string a in s with string b
e.g.
replace all occurrences of all characters in string a in s with string b e . g .