How can we replace a substring in C++ using str.replace?
Eg: str = "DOLLARISLLOD"
str.replace("LL","00") str = "DO00ARIS00OD"
In c++, it asks for index to begin and end, but if I want to generalize the replacement as and when those substrings occur.