From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function AnsiCompareFileName(const S1, S2: string; CheckVolumeCase: Boolean): Integer;


extern DELPHI_PACKAGE int __fastcall AnsiCompareFileName(const System::UnicodeString S1, const System::UnicodeString S2, bool CheckVolumeCase = false)/* overload */;


Type Visibility Source Unit Parent
function public
System.SysUtils System.SysUtils


Compares file names, based on the current locale.

AnsiCompareFileName compares two file names. The current locale controls the comparison operation. Comparison is case-insensitive under Windows, case-sensitive under MAC OS.

The return value is one of the following:

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 Multi-Byte Character Sets (MBCS), AnsiCompareFileName is identical to AnsiCompareText.

Under MAC OS, AnsiCompareFileName is identical to AnsiCompareStr.

See Also