Purpose |
Return the portion of a
|
Syntax |
a$ = REMAIN$([position&,] main$, [ANY] match$) |
Remarks |
REMAIN$ is a complement to the EXTRACT$ function. REMAIN$ uses the following parameters: |
main$ |
The main$ string is searched for the character or string specified in match$. If found, all characters after match$ are returned in a$. If match$ is not found in main$ then an empty string is returned in a$. |
position& |
An optional starting position within main$. If not specified, the first position is used. |
match$ |
The search string. If ANY is specified with match$, REMAIN$ will match the first instance of any single character in match$, not the whole string. |
Restrictions |
If position& evaluates to a position outside of the string on either side, or if position& is zero, an empty string is returned in a$. |
See also |
EXTRACT$, LEFT$, LTRIM$, MID$, REMOVE$, REPLACE, RIGHT$, RTRIM$, TALLY, TRIM$, VERIFY |
Example |
a$ = REMAIN$("I think, therefore I am hungry", ",") Result " therefore I am hungry" |