MCPcopy Create free account
hub / github.com/catboost/catboost / BeforeSuffix

Method BeforeSuffix

util/generic/strbuf.h:351–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349 }
350
351 inline bool BeforeSuffix(const TdSelf& suffix, TdSelf& result) const noexcept {
352 if (this->EndsWith(suffix)) {
353 result = Head(size() - suffix.size());
354 return true;
355 }
356 return false;
357 }
358
359 // returns true if string started with `prefix`, false otherwise
360 inline bool SkipPrefix(const TdSelf& prefix) noexcept {

Callers 2

Y_UNIT_TESTFunction · 0.80

Calls 3

sizeFunction · 0.50
EndsWithMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected