| 24 | } |
| 25 | |
| 26 | std::string string_replace(std::string subject, const std::string& search, const std::string& replace) { |
| 27 | size_t pos = 0; |
| 28 | while ((pos = subject.find(search, pos)) != std::string::npos) { |
| 29 | subject.replace(pos, search.length(), replace); |
| 30 | pos += replace.length(); |
| 31 | } |
| 32 | return subject; |
| 33 | } |
| 34 | |
| 35 | void string_replace_in_place(std::string& subject, const std::string& search, const std::string& replace) { |
| 36 | size_t pos = 0; |
no test coverage detected