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
std::string has a replace method, is that what you are looking for?
std::string
You could try:
s.replace(s.find("$name"), sizeof("$name") - 1, "Somename");
I haven't tried myself, just read the documentation on find() and replace().
find()
replace()