MCPcopy Create free account
hub / github.com/Tencent/phxrpc / StrReplaceAll

Function StrReplaceAll

codegen/code_utils.cpp:49–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void StrReplaceAll(string *haystack, string needle, string s) {
50 string::size_type pos = 0;
51 while ((pos = haystack->find(needle, pos)) != string::npos) {
52 haystack->erase(pos, needle.length());
53 haystack->insert(pos, s);
54 pos += s.length();
55 }
56}
57
58void StrAppendFormat(string *result, const char *fmt, ...) {
59 if (nullptr == fmt)

Callers 10

GenerateServerMainCppMethod · 0.85
GenerateServerEtcMethod · 0.85
GenerateMakefileMethod · 0.85
GenerateClientHppMethod · 0.85
GenerateClientCppMethod · 0.85
GenerateClientEtcMethod · 0.85
GenerateToolMainCppMethod · 0.85
GetMessageClassNameMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected