| 154 | } |
| 155 | |
| 156 | std::string replace( |
| 157 | std::string subject, const std::string& search, const std::string& replace) |
| 158 | { |
| 159 | size_t pos = 0; |
| 160 | while ((pos = subject.find(search, pos)) != std::string::npos) |
| 161 | { |
| 162 | subject.replace(pos, search.length(), replace); |
| 163 | pos += replace.length(); |
| 164 | } |
| 165 | return subject; |
| 166 | } |
| 167 | } |
no test coverage detected