MCPcopy Create free account
hub / github.com/apache/impala / TrimStringLeft

Function TrimStringLeft

be/src/gutil/strings/strip.cc:178–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176
177
178int TrimStringLeft(string* s, const StringPiece& remove) {
179 int i = 0;
180 while (i < s->size() && memchr(remove.data(), (*s)[i], remove.size())) {
181 ++i;
182 }
183 if (i > 0) s->erase(0, i);
184 return i;
185}
186
187int TrimStringRight(string* s, const StringPiece& remove) {
188 int i = s->size(), trimmed = 0;

Callers 1

TrimStringFunction · 0.85

Calls 3

eraseMethod · 0.80
sizeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected