I need to be able to replace all occurences of a string within another. in vb.net it would be:
My latest attempt was:
It also failed miserably. How would I do this?
I think it has something to do with this : http://www.cplusplus.com/reference/algorithm/replace.html
But I've never worked with vectors or algorithms before, so I am clueless on how to implement this on a string.
Thanks in advance,
Richard Carson
Code:
string = string.replace("chars to replace", "replace with")
My latest attempt was:
Code:
COM.replace (COM[1], COM[COM.length()], " ", "");
It also failed miserably. How would I do this?
I think it has something to do with this : http://www.cplusplus.com/reference/algorithm/replace.html
But I've never worked with vectors or algorithms before, so I am clueless on how to implement this on a string.
Thanks in advance,
Richard Carson