How would I do something in c++ similar to the following code:
c++
//Lang: Java string.replaceAll(\" \", \" \");
This code-snippe
Why not use a regular expression:
boost::regex_replace(str, boost::regex("[' ']{2,}"), " ");