MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / replaceInPlace

Function replaceInPlace

src/Core/Utils/StringUtils.cpp:87–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85 }
86
87 void replaceInPlace(
88 std::string& subject, const std::string& search, const std::string& replace)
89 {
90 size_t pos = 0;
91 while ((pos = subject.find(search, pos)) != std::string::npos)
92 {
93 subject.replace(pos, search.length(), replace);
94 pos += replace.length();
95 }
96 }
97
98 std::string replace(
99 std::string subject, const std::string& search, const std::string& replace)

Callers 2

isStringFloatFunction · 0.70
makeCombinationMethod · 0.50

Calls 2

findMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected