MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / replace

Method replace

src/flameGraph.cpp:23–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21class StringUtils {
22 public:
23 static void replace(std::string& s, char c, const char* replacement, size_t rlen) {
24 for (size_t i = 0; (i = s.find(c, i)) != std::string::npos; i += rlen) {
25 s.replace(i, 1, replacement, rlen);
26 }
27 }
28
29 static size_t getCommonPrefix(const std::string& a, const std::string& b) {
30 size_t length = a.size() < b.size() ? a.size() : b.size();

Callers 7

getFilePathMethod · 0.80
mainFunction · 0.80
getCommandMethod · 0.80
printConstantPoolMethod · 0.80
escapeMethod · 0.80
unescapeMethod · 0.80
toJavaClassNameMethod · 0.80

Calls 1

findMethod · 0.80

Tested by 1

getFilePathMethod · 0.64