bool replaceString(std::string& text, const std::string key, const std::string value)
{
std::string::size_type start = text.find(key), pos = 0;
for(; start != std::string::npos; start = text.find(key, pos))
{
text.replace(start, key.size(), value);
pos += start + key.size();
}
return true;
}
bool replaceString(std::string& text, const std::string key, const std::string value)
{
std::string::size_type start = text.find(key), pos = 0;
for(; start != std::string::npos; start = text.find(key, pos))
{
text.replace(start, key.size(), value);
pos += start + key.size();
}
return true;
}
where is that located?