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

Function GetFilename

tensorflow/cc/framework/cc_op_gen.cc:75–80  ·  view source on GitHub ↗

Converts: some/path/to/file.xx to: file (note that suffix is removed)

Source from the content-addressed store, hash-verified

73// to: file
74// (note that suffix is removed)
75string GetFilename(const string& path) {
76 size_t slash_pos = path.rfind('/');
77 if (slash_pos == path.npos) slash_pos = -1;
78 size_t dot_pos = path.rfind('.');
79 return path.substr(slash_pos + 1, dot_pos - (slash_pos + 1));
80}
81
82// Converts:
83// cc/ops/gen_foo_ops.h

Callers 1

StartFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected