I've spent the last hour and a half trying to figure out how to run a simple search and replace on a string
object in C++.
I have three string objects.
string original, search_val, replace_val;
I want to run a search command on original
for the search_val
and replace all occurrences with replace_val
.
NB: Answers in pure C++ only. The environment is XCode on the Mac OSX Leopard.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…