MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / extractParents

Function extractParents

src/util.cpp:209–219  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

207
208////////////////////////////////////////////////////////////////////////////////
209const std::vector<std::string> extractParents(const std::string& project,
210 const char& delimiter /* = '.' */) {
211 std::vector<std::string> vec;
212 std::string::size_type pos = 0;
213 std::string::size_type copyUntil = 0;
214 while ((copyUntil = project.find(delimiter, pos + 1)) != std::string::npos) {
215 if (copyUntil != project.size() - 1) vec.push_back(project.substr(0, copyUntil));
216 pos = copyUntil;
217 }
218 return vec;
219}
220
221////////////////////////////////////////////////////////////////////////////////
222bool nontrivial(const std::string& input) {

Callers 3

sort_projectsFunction · 0.85
executeMethod · 0.85
executeMethod · 0.85

Calls 1

findMethod · 0.80

Tested by

no test coverage detected