MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / trim

Function trim

extlibs/catch/include/catch/catch.hpp:13198–13204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13196 return lc;
13197 }
13198 std::string trim( std::string const& str ) {
13199 static char const* whitespaceChars = "\n\r\t ";
13200 std::string::size_type start = str.find_first_not_of( whitespaceChars );
13201 std::string::size_type end = str.find_last_not_of( whitespaceChars );
13202
13203 return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string();
13204 }
13205
13206 bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) {
13207 bool replaced = false;

Callers 7

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

Calls 2

substrMethod · 0.80
stringClass · 0.50

Tested by

no test coverage detected