fs/Path: document GetExtension()

This commit is contained in:
Max Kellermann 2022-07-14 17:35:56 +02:00
parent 254ee00c37
commit 849ed122c7
2 changed files with 8 additions and 0 deletions

View File

@ -295,6 +295,10 @@ public:
return Traits::Relative(c_str(), other_fs.c_str());
}
/**
* Returns the filename extension (excluding the dot) or
* nullptr if the path does not have one.
*/
[[gnu::pure]]
const_pointer GetExtension() const noexcept {
return Path{*this}.GetExtension();

View File

@ -166,6 +166,10 @@ public:
return Traits::IsAbsolute(c_str());
}
/**
* Returns the filename extension (excluding the dot) or
* nullptr if the path does not have one.
*/
[[gnu::pure]]
const_pointer GetExtension() const noexcept;
};