MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / MakeRelative

Function MakeRelative

tensorflow/contrib/ignite/kernels/igfs/igfs.cc:33–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33static string MakeRelative(const string &a, const string &b) {
34 string max = a;
35 string min = b;
36 bool first = b.size() > a.size();
37
38 if (first) {
39 max = b;
40 min = a;
41 }
42
43 auto r = mismatch(min.begin(), min.end(), max.begin());
44 return string((first ? r.first : r.second), first ? min.end() : max.end());
45}
46
47string IGFS::TranslateName(const string &name) const {
48 StringPiece scheme, namenode, path;

Callers 1

GetChildrenMethod · 0.85

Calls 3

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected