rindex (x, s)

The rindex function searches for the last occurrence of the string s in x.

It returns the offset of the first character of the last occurrence, or 0 if the string s did not occur in x.

The search is case insensitive.

This function returns a value of type Number.

Example
rindex ("abcdabcd", "cd")	

Result: 7, the second c in the string is in seventh position.

rindex ("AbCdaBcD", "cd")	

Result: 7, the second c in the string is in seventh position. The search is case insenitive.