| 138 | } |
| 139 | |
| 140 | void findAndReplace(std::string &source, const std::string &searchFor, const std::string &replaceWith) |
| 141 | { |
| 142 | std::string::size_type index = 0; |
| 143 | while ((index = source.find(searchFor, index)) != std::string::npos) { |
| 144 | source.replace(index, searchFor.length(), replaceWith); |
| 145 | index += replaceWith.length(); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | std::string replaceEscapeSequences(const std::string &source) { |
| 150 | std::string result; |