给出以下字符串, "Hi ~+ and ^*. Is ^* still flying around ~+?"
"Hi ~+ and ^*. Is ^* still flying around ~+?"
我想替换所有出现"~+",并"^*"以"波比"和"丹尼",因此字符串变成:
"~+"
"^*"
"Hi Bobby and Danny. Is Danny still flying around Bobby?"
我宁愿不必两次调用Boost替换函数来替换两个不同值的出现.
c++ string boost str-replace
boost ×1
c++ ×1
str-replace ×1
string ×1