lastIndexOf(const char *str) function

use: return index of last occurrence of the substring str in string, -1
otherwise.