FilenameExtIn function
Determines if the file name uses one of the specified file extensions.
Declaration
function FilenameExtIn(const Filename: string;
Exts: Array of string = string;
CaseSensitive: Boolean=False): BooleanDescription
FilenameExtIn is a
Boolean function used to determine
if the file name in the
Filename parameter uses one of the file
extension in
Exts.
Exts is an array type with the file extensions expected in the routine. Values in Exts can contain the '.' (Period) character in the extension, but it is not required.
CaseSensitive indicates if case-sensitivity is used when comparing
the parameter values. When set to
True, the comparison is limited to
characters in the ASCII character set.
StrLComp or
StrLIComp is called to compare the value in Filename to the values
in Exts.
The return value is True when Filename uses one the file extension in Exts. The return value is False when Filename is an empty string (''), does not include a '.' character that marks the start of the file extension, or does not use one of the values in Exts.
See also
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
