| 238 | //----------------------------------------------------------------------------- |
| 239 | |
| 240 | void InsertBefore(std::string& source, const std::string_view& find, const std::string_view& replace) |
| 241 | { |
| 242 | const std::string::size_type i = source.find(find, 0); |
| 243 | |
| 244 | if(std::string::npos != i) { |
| 245 | source.insert(i, replace); |
| 246 | } |
| 247 | } |
| 248 | //----------------------------------------------------------------------------- |
| 249 | |
| 250 | static void InsertAfter(std::string& source, const std::string_view& find, const std::string_view& replace) |
no outgoing calls
no test coverage detected