MCPcopy Create free account
hub / github.com/TASEmulators/fceux / mass_replace

Function mass_replace

src/utils/xstring.cpp:574–581  ·  view source on GitHub ↗

replace all instances of victim with replacement

Source from the content-addressed store, hash-verified

572
573// replace all instances of victim with replacement
574std::string mass_replace(const std::string &source, const std::string &victim, const std::string &replacement)
575{
576 std::string answer = source;
577 std::string::size_type j = 0;
578 while ((j = answer.find(victim, j)) != std::string::npos )
579 answer.replace(j, victim.length(), replacement);
580 return answer;
581}
582
583#ifdef __WIN_DRIVER__ // this code tends to crash on SDL.
584//http://www.codeproject.com/KB/string/UtfConverter.aspx

Callers 15

FCEU_CloseGameFunction · 0.85
FCEUI_LoadGameVirtualFunction · 0.85
FCEU_MakeFNameFunction · 0.85
DumpSubtitlesFunction · 0.85
FCEUD_AviRecordToFunction · 0.85
ShowLogDirDialogFunction · 0.85
SaveRomAsFunction · 0.85
dumpToFileFunction · 0.85
loadFromFileFunction · 0.85
MemViewCallBFunction · 0.85
SaveMemWatchFunction · 0.85
CreateSoundSaveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected