MCPcopy Create free account
hub / github.com/cuberite/cuberite / ReplaceString

Function ReplaceString

src/StringUtils.cpp:277–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275
276
277void ReplaceString(AString & iHayStack, const AString & iNeedle, const AString & iReplaceWith)
278{
279 size_t pos1 = iHayStack.find(iNeedle);
280 while (pos1 != AString::npos)
281 {
282 iHayStack.replace( pos1, iNeedle.size(), iReplaceWith);
283 pos1 = iHayStack.find(iNeedle, pos1);
284 }
285}
286
287
288

Callers 4

ExecuteMethod · 0.85
HandleWebadminRequestMethod · 0.85
tolua_do_errorFunction · 0.85
lua_do_errorFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected