MCPcopy Create free account
hub / github.com/XiaoMi/mace / StripString

Function StripString

mace/utils/string_util.cc:148–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

146}
147
148void StripString(std::string *s) {
149 if (s->empty()) {
150 return;
151 }
152 std::string whitespaces(" \t\f\v\n\r");
153 s->erase(0, s->find_first_not_of(whitespaces));
154 s->erase(s->find_last_not_of(whitespaces) + 1);
155}
156
157std::string GetStrAfterPattern(const std::string &str,
158 const std::string &pattern) {

Callers 1

IsCacheCompatibleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected