MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / replaceAll

Function replaceAll

core/stringconversion.cpp:67–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67void replaceAll(std::string& s, const std::string& item, const std::string& replacement) {
68 size_t pos = 0;
69 while ((pos = s.find(item, pos)) != std::string::npos) {
70 s.replace(pos, item.size(), replacement);
71 pos += replacement.size();
72 }
73}
74
75std::vector<std::string> split(const std::string& input, const std::string& regex) {
76 // passing -1 as the submatch index parameter performs splitting

Callers 2

getFilesFunction · 0.85
cleanFileNameFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected