把字符串S中所有A子串换成B。
// c++
void replaceA_to_B(std::string& S, const std::string A, const std::string B){
std::size_t found = S.find(A);
while (std::string::npos != found) {
S.replace(found, A.length(), B);
found = S.find(A, found + 1);
}