Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <regex>
- std::string s = "1000000000";
- std::regex e ("(\\d{1,3})(?=(?:\\d{3})+(?!\\d))");
- std::string res = std::regex_replace( s, e, "$1,");
- CCLOG( "%s", res.c_str() );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement