开发者

C++ Version For Java String.replaceAll

开发者 https://www.devze.com 2022-12-17 09:53 出处:网络
Java String.replaceAll comes very开发者_开发问答 handy. Has anyone encounter similar library in C++ (Even without regular expression match, but with exact match is OK)C++ has no built in lib to do th

Java String.replaceAll comes very开发者_开发问答 handy.

Has anyone encounter similar library in C++ (Even without regular expression match, but with exact match is OK)


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/

0

精彩评论

暂无评论...
验证码 换一张
取 消