std::filesystem::path::stem
From cppreference.com
< cpp | filesystem | path
| path stem() const; |
(since C++17) | |
Returns the filename identified by the path stripped of its extension.
Returns the substring from the beginning of filename() up to and not including the last period (.) character.
If the filename is one of the special filesystem components dot or dot-dot, or if it has no periods, the function returns the entire filename().
Contents |
[edit] Parameters
(none)
[edit] Return value
The stem of the filename identified by the path.
[edit] Exceptions
(none)
[edit] Example
Run this code
Output:
"bar" "" ".tar" ".baz" ".bar"
[edit] See also
| returns the filename path component (public member function) | |
| returns the file extension path component (public member function) |