Rose::StringUtility::fileNameSuffix
Get the file name suffix (extension) without the leading dot.
Synopsis
Declared in <src/Rose/StringUtility/FileUtility.h>
[[visibility]]
std::string
fileNameSuffix(std::string const& fileName);
Description
Filename could be either base name or name with full path. If no dot is found in the input fileName, the function just returns the original fileName.
Terms are loosely defined and this function is not likely to work correctly in some situations, such as when the "." is not in the last component of the file name. Consider using std::filesystem instead.
Return Value
Suffix without the leading dot.
Parameters
Name |
Description |
fileName |
Input path or filename. |
Created with MrDocs