<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > String functions > IsLike |
Description
Used to compare a source string with a string pattern returning %TRUE or %FALSE on similarity.
Syntax
n = IsLike(StringToCompare, StringPattern [, CaseSensitive])
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
||||||||||||
StringToCompare |
String |
No |
String to be checked |
||||||||||||
StringPattern |
String |
No |
Expression pattern. Wildcard supported expression pattern:
|
||||||||||||
CaseSensitive |
Number |
Yes |
%TRUE or %FALSE if comparison has to consider letter case. Default value is %FALSE. |
Remarks
Restrictions
See also
Examples
Script example
'---Set a checking variable
Dim lCheck As Long
'---Perform comparison.
'---We are checking if string starts with 3 chars (any)
'---followed by 5 numbers followed by whatever.
lCheck = IsLike("ABC1234567._extb", "???#####*", %False)
'---Show result
MSGBOX 0, "IsLike returned " & lCheck