MCPcopy Create free account
hub / github.com/covscript/covscript / split

Function split

sources/debugger.cpp:451–468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

449}
450
451cs::array split(const std::string &str)
452{
453 cs::array arr{path};
454 std::string buf;
455 for (auto &ch : str) {
456 if (std::isspace(ch)) {
457 if (!buf.empty()) {
458 arr.emplace_back(buf);
459 buf.clear();
460 }
461 }
462 else
463 buf.push_back(ch);
464 }
465 if (!buf.empty())
466 arr.emplace_back(buf);
467 return std::move(arr);
468}
469
470void covscript_main(int args_size, char *args[])
471{

Callers 1

covscript_mainFunction · 0.70

Calls 4

isspaceFunction · 0.85
moveFunction · 0.70
emptyMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected