I want simple C++ string based template library to replace strings at runtime.
For example, I will use
string template = \"My name is {{name}}\"; >
You can have a look at Inja. It is a simple, header-only template engine and does what you're asking for. There you can just call
data["name"] = "world"; inja::render("Hello {{ name }}!", data); // Returns "Hello world!"