| 56 | |
| 57 | |
| 58 | void AfString::replaceAll(std::string &data, std::string toSearch, std::string replaceStr) |
| 59 | { |
| 60 | // Get the first occurrence |
| 61 | size_t pos = data.find(toSearch); |
| 62 | |
| 63 | // Repeat till end is reached |
| 64 | while (pos != std::string::npos) { |
| 65 | // Replace this occurrence of Sub String |
| 66 | data.replace(pos, toSearch.size(), replaceStr); |
| 67 | // Get the next occurrence from the current position |
| 68 | pos = data.find(toSearch, pos + replaceStr.size()); |
| 69 | } |
| 70 | } |
| 71 | |
| 72 | int af_strstart(const char *str, const char *pfx, const char **ptr) |
| 73 | { |
no test coverage detected