MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / trim

Function trim

src/sys/utils.cxx:123–125  ·  view source on GitHub ↗

Strips leading and trailing spaces from a string

Source from the content-addressed store, hash-verified

121
122// Strips leading and trailing spaces from a string
123std::string trim(const std::string& s, const std::string& c) {
124 return trimLeft(trimRight(s, c), c);
125}
126
127std::string trimRight(const std::string& s, const std::string& c) {
128 std::string str(s);

Callers 6

createMethod · 0.85
parseCommandLineMethod · 0.85
readMethod · 0.85
getNextLineMethod · 0.85
parseMethod · 0.85
TESTFunction · 0.85

Calls 2

trimLeftFunction · 0.85
trimRightFunction · 0.85

Tested by 1

TESTFunction · 0.68