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

FilenameExtIs

Determines if Filename has the specified file extension.

Declaration

Source position: lazfileutils.pas line 37

function FilenameExtIs(

  const Filename: string;

  const Ext: string;

  CaseSensitive: Boolean = False

):Boolean;

Arguments

Filename

  

File name examined in the routine.

Ext

  

File extension expected in the file name.

CaseSensitive

  

True to use case-sensitive comparison in the routine.

Function result

Returns True if Filename has the specified file extension.

Description

FilenameExtIs is a Boolean function used to determine if the file in the Filename parameter has the specified file extension in Ext.

Ext can contain the '.' (Period) character in the extension, but it is not required.

CaseSensitive indicates if case-sensitivity is used when comparing parameter values. When set to True, the comparison is limited to values in the ASCII character set. StrLComp or StrLIComp is called to compare the values in Filename to the values in Ext.

The return value is True when Filename uses the file extension in Ext. The return value is False for the following conditions:

See also

FilenameExtIn

  

Determines if the file name uses one of the specified file extensions.


Version 3.2 Generated 2024-02-25 Home