MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / split

Function split

Global/StrUtils.cpp:400–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398 }
399
400 std::vector<std::string> split(const std::string &text, char sep) {
401 std::vector<std::string> tokens;
402 std::size_t start = 0, end = 0;
403 while ((end = text.find(sep, start)) != std::string::npos) {
404 if (end != start) {
405 tokens.push_back(text.substr(start, end - start));
406 }
407 start = end + 1;
408 }
409 if (end != start) {
410 tokens.push_back(text.substr(start));
411 }
412 return tokens;
413 }
414
415 std::string join(const std::vector<std::string> &text, char sep)
416 {

Callers 1

Calls 2

findMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected