| 13 | std::string regex(std::string str, std::string regexStr, unsigned group = 0); |
| 14 | |
| 15 | static inline void replaceStrOnce(std::string &str, const std::string &from, |
| 16 | const std::string &to) { |
| 17 | size_t start_pos = 0; |
| 18 | if ((start_pos = str.find(from, start_pos)) != std::string::npos) { |
| 19 | str.replace(start_pos, from.length(), to); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | static inline void replaceStrAll(std::string &str, const std::string &from, |
| 24 | const std::string &to) { |