|
WildcardCompare
int
WildcardCompare(string
pattern, string string)
Return
Value
Returns 1 if string matches pattern. Otherwise returns 0.
Parameters
pattern
–pattern string
containing wildcard characters.
Supported
wildcard characters are:
? – any single character;
* - any group of characters.
string
– string that needs to be compared
with pattern.
Remarks
Compares given
string with a pattern.
Example
The following
example demonstrates the use of WildcardCompare.
# Example for WildcardCompare
stringsFileName
="Report003.xml"
intiStatus
=
WildcardCompare
("*.xml",
sFileName)
if(iStatus)
Println("This
file is an xml document")
else
Println("This
file is not an xml document")
endif
Output of the example
script:
This
file is an xml document
|