Name
rindex
Synopsis
rindex str, substr, [position]
Works just like index
except that it returns the
position of the last occurrence of
substr
in
str
(a reverse index
). The function returns -1
if not found.
position
, if specified, is the
rightmost position that may be returned, i.e., how far in the
string the function can search.
Get Perl in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.