[Overview][Types][Classes][Procedures and functions][Index] Reference for unit 'Masks' (#lazutils)

TMask.Create

Constructor for the class instance.

Declaration

Source position: masks.pas line 53

public constructor TMask.Create(

  const AValue: string;

  const CaseSensitive: Boolean

);

constructor TMask.Create(

  const AValue: string;

  const AOptions: TMaskOptions = []

);

Arguments

AValue

  

Mask value for the class instance.

CaseSensitive

  

True if case sensitivity is used when comparing a file name to the mask value.

Arguments

AValue

  

Mask value for the class instance.

AOptions

  

Contains options enabled or disabled in the class instance.

Description

Create is the overloaded constructor for the class instance. Overloaded variants are provided with parameter values that are used to configure the class instance.

AValue contains the pattern compared to a given file name in methods for the class. While defined as a String type, AValue is limited to the single-byte code points in the UTF-8 encoding. Using a multi-byte UTF-8 code point in AValue causes an EMaskError exception to be raised.

Each UTF-8 code point in AValue is examined, and the internal TMaskString is updated to reflect how the mask character is applied. For example:

CaseSensitive indicates if case sensitivity is used when comparing a file name to the mask value.

AOptions contains zero or more TMaskOption values which enable or disable features in the methods for the class instance.

Create calls the private InitMaskString method to initialize the internal TMaskString instance used in the class.

See also

TMaskString

  

Represent characters and symbols in a mask.

TMaskOptions

  

Set type used to store values from the TMaskOption enumeration.

TMaskOption

  

Contains options which can be enabled or disabled in TMask comparisons.

EMaskError

  

Exception raised for an invalid character in TMask.

lrsInvalidCharSet