Position == RHS.Position;
}
-const StringRef root_path(StringRef path) {
+StringRef root_path(StringRef path) {
const_iterator b = begin(path),
pos = b,
e = end(path);
return StringRef();
}
-const StringRef root_name(StringRef path) {
+StringRef root_name(StringRef path) {
const_iterator b = begin(path),
e = end(path);
if (b != e) {
return StringRef();
}
-const StringRef root_directory(StringRef path) {
+StringRef root_directory(StringRef path) {
const_iterator b = begin(path),
pos = b,
e = end(path);
return StringRef();
}
-const StringRef relative_path(StringRef path) {
+StringRef relative_path(StringRef path) {
StringRef root = root_path(path);
return path.substr(root.size());
}
path::append(path, *begin);
}
-const StringRef parent_path(StringRef path) {
+StringRef parent_path(StringRef path) {
size_t end_pos = parent_path_end(path);
if (end_pos == StringRef::npos)
return StringRef();
#endif
}
-const StringRef filename(StringRef path) {
+StringRef filename(StringRef path) {
return *rbegin(path);
}
-const StringRef stem(StringRef path) {
+StringRef stem(StringRef path) {
StringRef fname = filename(path);
size_t pos = fname.find_last_of('.');
if (pos == StringRef::npos)
return fname.substr(0, pos);
}
-const StringRef extension(StringRef path) {
+StringRef extension(StringRef path) {
StringRef fname = filename(path);
size_t pos = fname.find_last_of('.');
if (pos == StringRef::npos)
static const char preferred_separator_string[] = { preferred_separator, '\0' };
-const StringRef get_separator() {
+StringRef get_separator() {
return preferred_separator_string;
}