Java String.replaceAll comes very handy.
Has anyone encounter similar library in C++ (Even without regular expression match, but with exact match is OK)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
C++ has no built in lib to do that, but Boost has string replace functions:
http://www.boost.org/doc/libs/1_41_0/doc/html/string_algo/usage.html#id1701549
Also without STL here is an example:
http://www.linuxquestions.org/questions/programming-9/replace-a-substring-with-another-string-in-c-170076/