MaskCheck

From Soldat Community Wiki
Jump to: navigation, search

From the Scripting Manual

function MaskCheck(CheckString, Mask: string): boolean

Parameter Info:
 CheckString (String): String to be checked.
 Mask (String): Mask to be used to check (CheckString).

Description:
 This function will return TRUE or FALSE if (CheckString) matches (Mask).

Mask Example:
* = Full Wildcard
? = Single character Wildcard

Examples

var
MyString: string;
begin
    MyString := '127.94.45.244';
    MaskCheck(MyString,'127.*.*.*'); // True
    MaskCheck(MyString,'127.?.?.?'); // False
    MaskCheck(MyString,'127.9?.*.*'); // True
    MaskCheck(MyString,'12?.?4.4?.2*4'); // True
    MaskCheck(MyString,'127.94.45.244'); // True
    MaskCheck(MyString,'123.94.45.244'); // False
end;


External Links