MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / splitString

Function splitString

lib/utils.cpp:186–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184
185
186std::vector<std::string> splitString(const std::string& str, char sep)
187{
188 std::vector<std::string> l;
189
190 std::string::size_type pos1 = 0;
191 std::string::size_type pos2;
192 while (true) {
193 pos2 = str.find(sep, pos1);
194 l.push_back(str.substr(pos1, pos2 - pos1));
195 if (pos2 == std::string::npos)
196 break;
197 pos1 = pos2 + 1;
198 }
199 return l;
200}

Callers 7

parseLineMethod · 0.70
getClassificationFunction · 0.70
createGuidelineMappingFunction · 0.70
analyseClangTidyMethod · 0.70
parseFromArgsMethod · 0.50
handleReadMethod · 0.50
splitStringMethod · 0.50

Calls 2

findMethod · 0.45
push_backMethod · 0.45

Tested by 1

splitStringMethod · 0.40