rindex $string, $substring, 0
searches for $substring in $string at position <=0 which is only possible if $substring is a prefix of $string. Example:
> rindex "abc", "a", 0
0
> rindex "abc", "b", 0
-1
rindex $string, $substring, 0
searches for $substring in $string at position <=0 which is only possible if $substring is a prefix of $string. Example:
> rindex "abc", "a", 0
0
> rindex "abc", "b", 0
-1