SECFileSystem::GetExtension
CStringSECFileSystem::GetExtension(const CString&PathAndFileName)
Returns the extension of the filename.
Defined in: filesys.cpp
Return Value
The extension (if any) of the specified file. If there are multiple extensions on the specified filename, the last extension is returned.
Parameters
PathAndFileName
Name and possibly path to the file.
Comments
To return the extension from a path. The extension is all characters after the final '.' unless the '.' is followed by a '/' or '\'.
Example
CString sExt = fs.GetExtension("c:\\foo\\bar\\what.txt");
ASSERT(sExt == "txt");
CString sExt = fs.GetExtension("c:\\foo\\bar\\what.txt.john");
ASSERT(sExt == "john");
See Also
SECFileSystem GetFileName GetPath GetFileSystem GetBaseFileName