Please enable JavaScript to view this site.

thinBasic Help Manual

* * HELP & MANUAL PREMIUM PACK 4 DEMO VERSION * *

This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.

This version is copyright and may only be used for local testing purposes. It may not be distributed.

Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.

 

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:

 

Char

Meaning

?

Any single character

*

Zero or more characters

#

Any single digit (0-9)

[charlist]

Any single character in 'charlist'

[!charlist]

Any single character not in 'charlist'

 

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

 

Created with Help+Manual 8 and styled with Premium Pack Version 4 © by EC Software