std::string file_name_extension(std::string const &path)
- The extension of the file name part of
path, including the period, if any. This is the substring starting from the last period, except that:
- if the file name part is "." or ".." (without quotes) or does not contain a period, the result is an empty string;
- if the file name part begins with a period, then that initial period (and only that) is ignored (so ".dotfile" gives "", while ".dotfile.txt" gives ".txt").
- This behavior is aligned with that of
Line 40 in breeze/path/file_name_extension.hpp.