indexOf(const char *str) function

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