int rindex(const char *s
, const char *subs
) int rindex(const char *s
, const char *subs
, intstart
)
The rindex
function locates the position of
the last occurrence of the substring
subs
in the string
s
, starting at the optional position,
start
. If the specified value of
start
is less than
0
, it is implicitly set to
0
. If s
is an
empty string, rindex
returns
0
. If no match is found for
subs
in s
,
rindex
returns -1
.