MaskCheck

From Soldat Community Wiki
Revision as of 11:13, 15 August 2012 by Freeman (talk | contribs) (Created page with "===From the Scripting Manual=== ''function MaskCheck(CheckString, Mask: string): boolean'' '''Parameter Info:''' CheckString (String): String to be checked. Mask (Stri...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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