MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / findAndReplace

Function findAndReplace

lib/utils.cpp:140–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void findAndReplace(std::string &source, const std::string &searchFor, const std::string &replaceWith)
141{
142 std::string::size_type index = 0;
143 while ((index = source.find(searchFor, index)) != std::string::npos) {
144 source.replace(index, searchFor.length(), replaceWith);
145 index += replaceWith.length();
146 }
147}
148
149std::string replaceEscapeSequences(const std::string &source) {
150 std::string result;

Callers 4

toStringMethod · 0.85
importVcxitemsMethod · 0.85
hasEmacsCppMarkerFunction · 0.85
findAndReplaceMethod · 0.85

Calls 2

findMethod · 0.45
replaceMethod · 0.45

Tested by 1

findAndReplaceMethod · 0.68