Extracts the file extension, if there is one.
Extension = SRP_Path("GetExtension", Path, IncludePeriod) |
Parameter | Description |
---|---|
Path | A path with or without command line parameters. |
IncludePeriod | 1 to include the period, 0 to not include the period. |
The file extension, if there is one.
The GetExtension service extracts the file extension. The extension will include a preceding 0 if IncludePeriod is set to 1. Otherwise, the extension is returned without the period.
Note. This method supports paths that contain command line parameters. In this case, command line parameters are simply ignored.
Result1 = SRP_Path("GetExtension", "C:\path\filename.txt", 1) Result2 = SRP_Path("GetExtension", "C:\path\filename.txt.ext", 0) |
Result1 will be ".txt". Result2 will be "ext".
AddExtension, GetComponents, GetDirectory, GetFilename, GetParameters, GetPath, RemoveExtension, RenameExtension