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

Method BasenameView

cpp/src/arrow/filesystem/azurefs.cc:1993–1999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1991 }
1992
1993 static std::string_view BasenameView(std::string_view s) {
1994 DCHECK(!internal::HasTrailingSlash(s));
1995 auto offset = s.find_last_of(internal::kSep);
1996 auto result = (offset == std::string_view::npos) ? s : s.substr(offset);
1997 DCHECK(!result.empty() && result.back() != internal::kSep);
1998 return result;
1999 }
2000
2001 /// \brief List the paths at the root of a filesystem or some dir in a filesystem.
2002 ///

Callers

nothing calls this directly

Calls 4

HasTrailingSlashFunction · 0.85
substrMethod · 0.80
backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected