System.Masks.TMask.Matches

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Matches(const Filename: string): Boolean;

C++

bool __fastcall Matches(const System::UnicodeString Filename);

Properties

Type Visibility Source Unit Parent
function public
System.Masks.pas
System.Masks.hpp
System.Masks TMask

Description

Indicates whether a specified string matches the mask.

Call Matches to compare the Filename parameter to the mask that describes valid values. Matches returns true if the string matches the mask. Matches returns false if the string does not match the mask. Matches raises an exception if the mask is syntactically invalid.

The mask is set when the TMask object is created.

Note: Filename parameter does not need to be a file name. TMask can be used to check strings against any syntactically correct mask.

See Also