[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'LazFileUtils' (#lazutils)

CompareFilenamesP

Compares file names to determine their relative sort order.

Declaration

Source position: lazfileutils.pas line 34

function CompareFilenamesP(

  Filename1: PChar;

  Filename2: PChar;

  IgnoreCase: Boolean = False

):Integer;

Arguments

Filename1

  

File name used in the comparison.

Filename2

  

File name used in the comparison.

IgnoreCase

  

Indicates if case differences in file name comparisons are ignored.

Function result

Relative sort order for the compared values.

Description

CompareFilenamesP is an Integer function used to compare the specified file names to determine their relative sort order.

Filename1 and Filename2 are the PChar arguments containing the file names examined in the routine.

IgnoreCase indicates if upper- or lower-case differences are ignored in the file name comparison; the default value for the parameter is False (indicating that case differences are not ignored). For platforms where CaseInsensitiveFilenames is defined, the value in IgnoreCase defaults to True. When IgnoreCase is True, the UTF8CompareText function is called to perform a case-insensitive comparison of the specified file names. Otherwise, the ordinal byte values in the specified file names are compared until a difference is found, or the entire file name in Filename1 has been examined.

If either Filename1 or Filename2 are unassigned (contain Nil) or begin with a Null character (Decimal 0), the return value is set 0 (zero) and no additional actions are performed in the function. See CompareFilenames for more information about the numeric return value for the function and its meaning.

See also

CompareFilenames

  

Gets the relative sort order for the specified file names.

UTF8CompareText


Version 3.2 Generated 2024-02-25 Home