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

Function RemoveTrailingSlash

cpp/src/arrow/dataset/subtree_test.cc:102–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100using PT = TestPathTree;
101
102std::string_view RemoveTrailingSlash(std::string_view key) {
103 while (!key.empty() && key.back() == '/') {
104 key.remove_suffix(1);
105 }
106 return key;
107}
108bool IsAncestorOf(std::string_view ancestor, std::string_view descendant) {
109 // See filesystem/path_util.h
110 ancestor = RemoveTrailingSlash(ancestor);

Callers 1

IsAncestorOfFunction · 0.70

Calls 2

backMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected