Is it possible in C++ to replace part of a string with another string?
Basically, I would like to do this:
QString string(\"hello $name\"); string.re
With C++11 you can use std::regex like so:
std::regex
#include ... std::string string("hello $name"); string = std::regex_replace(string, std::regex("\\$name"), "Somename");
The double backslash is required for escaping an escape character.