std::string ReplaceM(std::string& orignStr,const std::string& oldStr,const std::string& newStr)
{
size_t pos = 0;
std::string tmpStr = orignStr;
std::string::size_type newStrLen = newStr.length();
std::string::size_type oldStrLen = oldStr.length();
bool flag = true;
while(true)
{
pos = tmpStr.find(oldStr,pos);
if(pos == std::string::npos) break;
tmpStr.replace(pos,oldStrLen,newStr);
pos += newStrLen;
flag =false;
}
if(!flag)
return ReplaceM(tmpStr,oldStr,newStr);
return tmpStr;
}