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

Function RootPrefixLength

util/system/src_root.h:55–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 constexpr unsigned RootPrefixLength(const TStaticBuf& f) noexcept {
56 if (IsProperPrefix(ArcRoot, f)) {
57 return ArcRoot.Len + 1;
58 }
59 if (IsProperPrefix(BuildRoot, f)) {
60 return BuildRoot.Len + 1;
61 }
62 return 0;
63 }
64
65 constexpr Y_FORCE_INLINE TStaticBuf StripRoot(const TStaticBuf& f, unsigned prefixLength) noexcept {
66 return TStaticBuf(f.Data + prefixLength, f.Len - prefixLength);

Callers 2

Y_UNIT_TESTFunction · 0.85
TStaticBuf StripRootFunction · 0.85

Calls 1

IsProperPrefixFunction · 0.85

Tested by

no test coverage detected