MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / StringReplace

Function StringReplace

serving/processor/serving/model_instance.cc:115–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115void StringReplace(std::string& strBig, const std::string& strsrc,
116 const std::string& strdst) {
117 std::string::size_type pos = 0;
118 std::string::size_type srclen = strsrc.size();
119 std::string::size_type dstlen = strdst.size();
120
121 while ((pos = strBig.find(strsrc, pos)) != std::string::npos) {
122 strBig.replace(pos, srclen, strdst);
123 pos += dstlen;
124 }
125}
126void GenerateJsonSignatureFormat(
127 const std::pair<std::string, SignatureDef>& signature,
128 std::string& json_signature) {

Callers 1

Calls 3

replaceMethod · 0.80
sizeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected