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

Function trimComments

src/sys/utils.cxx:139–141  ·  view source on GitHub ↗

Strips the comments from a string This is the compliment of trimLeft

Source from the content-addressed store, hash-verified

137// Strips the comments from a string
138// This is the compliment of trimLeft
139std::string trimComments(const std::string& s, const std::string& c) {
140 return s.substr(0, s.find_first_of(c));
141}
142
143std::string toString(const time_t& time) {
144 return fmt::format("{:%c}", *std::localtime(&time));

Callers 2

getNextLineMethod · 0.85
TESTFunction · 0.85

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.68