| 96 | } |
| 97 | |
| 98 | std::string replace( |
| 99 | std::string subject, const std::string& search, const std::string& replace) |
| 100 | { |
| 101 | size_t pos = 0; |
| 102 | while ((pos = subject.find(search, pos)) != std::string::npos) |
| 103 | { |
| 104 | subject.replace(pos, search.length(), replace); |
| 105 | pos += replace.length(); |
| 106 | } |
| 107 | return subject; |
| 108 | } |
| 109 | |
| 110 | bool isSurroundedBy(const std::string& string, const std::string& bet) |
| 111 | { |
no test coverage detected