REMAIN$ function

Purpose:

If Match$ is found in MainStr$, REMAIN$ gets all characters in MainStr$ from the end of Match$. REMAIN$ complements the EXTRACT$ function

Syntax:

RetStr$ = REMAIN$(MainStr AS STRING, Match AS STRING)

Return Value:

  • Data type: STRING
    RetStr portion of MainStr$ string. REMAIN$ returns MainStr$ when a match is not found.

Parameters:

  • Data type: STRING
    MainStr String to be searched and parsed.
  • Data type: STRING
    Match SubString to be located in MainStr$.

Example:

DIM RetStr$

RetStr$ = REMAIN$("Filename.bas", "name")

PRINT RetStr$

Result:

.bas