UPTO$( )

UPTO$( source$, match$ )

Description:

Search in source$ for a match for the string in match$.  Return all the characters before the matching string.

Usage:

  text$ = upto$("return all this before token but not after", "token") + "!"
  print text$

Produces:

  return all this before !

Notice the space between before and the ! which is also part of the string before token.

If there is no match found then all of source$ will be returned.

See also AFTER$( ), AFTERLAST$( )