| 10 | |
| 11 | |
| 12 | void replaceAll( |
| 13 | std::string & subject |
| 14 | , const std::string & search |
| 15 | , const std::string & replace) |
| 16 | { |
| 17 | size_t pos = 0; |
| 18 | |
| 19 | while((pos = subject.find(search, pos)) != std::string::npos) |
| 20 | { |
| 21 | subject.replace(pos, search.length(), replace); |
| 22 | pos += replace.length(); |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | |
| 27 | } // namespace |
no test coverage detected