MCPcopy Create free account
hub / github.com/alibaba/CicadaPlayer / replaceAll

Method replaceAll

framework/utils/af_string.cpp:58–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58void 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
72int af_strstart(const char *str, const char *pfx, const char **ptr)
73{

Callers 2

formatHexDumpMethod · 0.80
parseOverrideStyleMethod · 0.80

Calls 2

findMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected