RSTRPOS function finds the
occurrence of a
substring within an object string (the STRPOS function finds the first occurrence of a substring). If the substring is found in the expression, RSTRPOS returns the character position of the match, otherwise it returns -1.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
Result = RSTRPOS(
Expression, Search_String [, Pos]
The expression string in which to search for the substring.
The substring to be searched for within
The character position before which the search is begun. If
is omitted, the search begins at the last character of
exp = 'Holy smokes, Batman!'
pos = RSTRPOS(exp, 'smokes')