| 38 | } |
| 39 | |
| 40 | void string_replace_in_place(std::string& subject, const std::string& search, const std::string& replace) |
| 41 | { |
| 42 | size_t pos = 0; |
| 43 | while ((pos = subject.find(search, pos)) != std::string::npos) |
| 44 | { |
| 45 | subject.replace(pos, search.length(), replace); |
| 46 | pos += replace.length(); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | #pragma warning(disable : 4996) |
| 51 | //https://stackoverflow.com/questions/4804298/how-to-convert-wstring-into-string |