MCPcopy Create free account
hub / github.com/daniele77/cli / ExtractContent

Function ExtractContent

test/test_cli.cpp:68–77  ·  view source on GitHub ↗

takes cli> sub> foo bar sub> and gives foo bar */

Source from the content-addressed store, hash-verified

66
67*/
68string ExtractContent(const stringstream& o)
69{
70 auto content = o.str();
71 // last line
72 auto lastNL = content.find_last_of('\n');
73 auto lastLine = content.substr(lastNL+1);
74 content = content.substr(0, lastNL);
75 auto pos = content.find(lastLine);
76 return content.substr(pos+lastLine.size());
77}
78
79void UserInput(Cli& cli, stringstream& oss, const string& input)
80{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected