用另一个子串C ++替换substring
我怎么能用C ++中的另一个子字符串替换字符串中的子字符串,我可以使用哪些函数?
eg: string test = "abc def abc def";test.replace("abc", "hij").replace("def", "klm"); //replace occurrence of abc and def with other substring
相关分类