Compares file names based on the current locale.
function AnsiCompareFileName(const S1: string; const S2: string): Integer;
int AnsiCompareFileName(const AnsiString S1, const AnsiString S2);
SysUtils
AnsiCompareFileName compares two file names. The current locale controls the compare operation. Comparison is case-insensitive under Windows, case-sensitive under Linux.
The return value is:
Condition |
Return Value |
S1 > S2 |
> 0 |
S1 < S2 |
< 0 |
S1 = S2 |
= 0 |
AnsiCompareFileName supports the idiosyncrasies of MS-DOS file names that use Zenkaku Moji, a character encoding used in some Asian locales. Under Windows locales that do not use MBCS, AnsiCompareFileName is identical to AnsiCompareText. Under Linux, AnsiCompareFileName is identical to AnsiCompareStr.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|