MCPcopy Create free account
hub / github.com/berthubert/trifecta / replaceSubstring

Function replaceSubstring

support.cc:17–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15}
16
17void replaceSubstring(std::string &originalString, const std::string &searchString, const std::string &replaceString) {
18 size_t pos = originalString.find(searchString);
19
20 while (pos != std::string::npos) {
21 originalString.replace(pos, searchString.length(), replaceString);
22 pos = originalString.find(searchString, pos + replaceString.length());
23 }
24}
25
26string htmlEscape(const std::string& str)
27{

Callers 1

htmlEscapeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected