mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-20 09:55:07 -04:00
util::string_view, update pgl for new sf semantics
This commit is contained in:
parent
83c04fa5d7
commit
3bb94aa146
13 changed files with 448 additions and 70 deletions
|
@ -24,17 +24,17 @@ namespace ams::ncm::impl {
|
|||
|
||||
}
|
||||
|
||||
bool PathView::HasPrefix(std::string_view prefix) const {
|
||||
bool PathView::HasPrefix(util::string_view prefix) const {
|
||||
return this->path.compare(0, prefix.length(), prefix) == 0;
|
||||
}
|
||||
|
||||
bool PathView::HasSuffix(std::string_view suffix) const {
|
||||
bool PathView::HasSuffix(util::string_view suffix) const {
|
||||
return this->path.compare(this->path.length() - suffix.length(), suffix.length(), suffix) == 0;
|
||||
}
|
||||
|
||||
std::string_view PathView::GetFileName() const {
|
||||
util::string_view PathView::GetFileName() const {
|
||||
auto pos = this->path.find_last_of("/");
|
||||
return pos != std::string_view::npos ? this->path.substr(pos + 1) : this->path;
|
||||
return pos != util::string_view::npos ? this->path.substr(pos + 1) : this->path;
|
||||
}
|
||||
|
||||
MountName CreateUniqueMountName() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue