Navigation: thinBasic Modules > Core > String handling > 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 |
No |
%TRUE or %FALSE if comparison has to consider letter case. |
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
© 2004-2008 thinBasic. All rights reserved. | Version 1.7.0.0 | Web Site: http://www.thinbasic.com |