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

Function GetFile

tools/archiver/main.cpp:305–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305static inline TString GetFile(const TString& s) {
306 const char* e = s.end();
307 const char* b = s.begin();
308 const char* c = e - 1;
309
310 while (c != b && !IsDelim(*c)) {
311 --c;
312 }
313
314 if (c != e && IsDelim(*c)) {
315 ++c;
316 }
317
318 return TString(c, e - c);
319}
320
321static inline TString Fix(TString f) {
322 if (!f.empty() && IsDelim(f[f.size() - 1])) {

Callers 4

RecurseMethod · 0.85
parent_name_keyMethod · 0.85
parent_name_keyMethod · 0.85
ResizeAndResetMethod · 0.85

Calls 3

IsDelimFunction · 0.85
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected