Syntax: index (STR <str1>, STR <str2> [, <case-matters>]) => INT
rindex (STR <str1>, STR <str2> [, <case-matters>]) => INT
The function `index()' (`rindex()') returns the index of the first character of the first (last) occurrence of <str2> in <str1>, or zero if <str2> does not occur in <str1> at all. By default the search for an occurrence of <str2> is done while ignoring the upper/lower case distinction. If <case-matters> is provided and true, then case is treated as significant in all comparisons.