RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMask.Matches Method

Indicates whether a specified string matches the mask.

Pascal
function Matches(const Filename: string): Boolean;
C++
__fastcall Boolean Matches(const AnsiString Filename);

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.
 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!