MCPcopy Create free account
hub / github.com/cselab/aphros / Strip

Function Strip

src/parse/codeblocks.cpp:23–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21};
22
23static std::string Strip(std::string s) {
24 size_t b = 0;
25 size_t e = s.size();
26 while (b < e && std::isspace(s[b])) {
27 ++b;
28 }
29 while (b < e && std::isspace(s[e - 1])) {
30 --e;
31 }
32 return s.substr(b, e - b);
33}
34
35// Extacts the next code block from stream f.
36// Returns true if found.

Callers 2

ParseCodeBlockFunction · 0.70
ParseCodeBlocksFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected