System.SysUtils.AnsiCompareFileName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

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

Description

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