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
Search a string for the first occurrence of a specified character or string.
If match is found, only the left 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.
If MatchString is not found, REMAIN$ returns the full string.
See also
Examples