MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / trim

Function trim

Bcore/src/main/cpp/Dobby/tests/catch.hpp:9525–9531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9523 return lc;
9524}
9525std::string trim(std::string const &str) {
9526 static char const *whitespaceChars = "\n\r\t ";
9527 std::string::size_type start = str.find_first_not_of(whitespaceChars);
9528 std::string::size_type end = str.find_last_not_of(whitespaceChars);
9529
9530 return start != std::string::npos ? str.substr(start, 1 + end - start) : std::string();
9531}
9532
9533bool replaceInPlace(std::string &str, std::string const &replaceThis, std::string const &withThis) {
9534 bool replaced = false;

Callers 6

makeCommandLineParserFunction · 0.85
writeGroupMethod · 0.85
writeSectionMethod · 0.85
testCaseStartingMethod · 0.85
sectionStartingMethod · 0.85
testCaseEndedMethod · 0.85

Calls 1

substrMethod · 0.45

Tested by

no test coverage detected