MCPcopy Create free account
hub / github.com/apache/arrow / GetAbstractPathExtension

Function GetAbstractPathExtension

cpp/src/arrow/filesystem/path_util.cc:112–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112std::string GetAbstractPathExtension(const std::string& s) {
113 std::string_view basename(s);
114 auto offset = basename.find_last_of(kSep);
115 if (offset != std::string::npos) {
116 basename = basename.substr(offset);
117 }
118 auto dot = basename.find_last_of('.');
119 if (dot == std::string_view::npos) {
120 // Empty extension
121 return "";
122 }
123 return std::string(basename.substr(dot + 1));
124}
125
126Status ValidateAbstractPathParts(const std::vector<std::string>& parts) {
127 for (const auto& part : parts) {

Callers 3

OpenCompressedMethod · 0.85
extensionMethod · 0.85
TESTFunction · 0.85

Calls 1

substrMethod · 0.80

Tested by 1

TESTFunction · 0.68