| [Overview][Constants][Types][Procedures and functions][Variables][Index] |
Performs a sort order comparison for the specified file name and extension.
Source position: lazfileutils.pas line 35
function CompareFileExt( |
const Filename: string; |
Ext: string; |
CaseSensitive: Boolean |
):Integer; |
const Filename: string; |
const Ext: string |
):Integer; |
Filename |
|
File name for the comparison. |
Ext |
|
File extension for the comparison. |
CaseSensitive |
|
True if case sensitive comparison is needed. |
Relative sort order for the compared values.
Filename |
|
File name for the comparison. |
Ext |
|
File extension for the comparison. |
CompareFileExt is an Integer function used to compare the file extension in Filename to the value in Ext. Ext may contain the '.' character, but it is not required and will be removed for the comparison. CaseSensitive indicates whether case is ignored in the comparison. When CaseSensitive contains True, CompareStr is called to perform the comparison. Otherwise, UTF8CompareText is called to compare the values. The return value will contain one of the following:
The return is 1 if Filename does not contain a file extension.