Navigation:  thinBasic Modules > Core > String handling >

REMAIN$

Previous pageReturn to chapter overviewNext page

 

Description

 

Search a string for the first occurrence of a specified character or string.

If match is found, only the right part of MainStr will be returned.

 

Syntax

 

s = REMAIN$([StartPos, ] MainStr, [ANY] MatchStr [, CaseSensitive])

 

Returns

 

String

 

Parameters

 

Name

Type

Optional

Meaning

StartPosition

Number

Yes

Search starting point inside MainString

MainString

String

No

String to search into

MatchString

String

No

String to search for

CaseSensitive

Number

Yes

Optional parameter used to indicate if match must be case sensitive or not.

Use %TRUE or %FALSE. Default value is %TRUE

 

Remarks

 

If StartPosition is omitted, search will start from first byte of MainString going left to right.

If StartPosition is positive, search will go from left to right.

If StartPosition is negative, search will go from right to left.

 

If the ANY keyword is specified, MatchString specifies a list of single characters to be searched for individually.

 

Restrictions

 

REMAIN$ is case-sensitive, meaning that upper-case and lower-case letters must match exactly in MatchString and MainString.

If MatchString is null, REMAIN$ returns the full string.

 

See also

 

String Handling,

 

Examples

 

 

 

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com