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

Function replaceAll

externals/simplecpp/simplecpp.cpp:175–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175static std::string replaceAll(std::string s, const std::string& from, const std::string& to)
176{
177 for (size_t pos = s.find(from); pos != std::string::npos; pos = s.find(from, pos + to.size()))
178 s.replace(pos, from.size(), to);
179 return s;
180}
181
182void simplecpp::Location::adjust(const std::string &str)
183{

Callers 2

evalConditionMethod · 0.85
readfileMethod · 0.85

Calls 3

findMethod · 0.45
sizeMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected