findIndexFinds the first index of the substr in the str. If not found, returns -1.
str ( string ): The input string.substr ( string ): The substring to find.number ): The index of the first occurrence of the substring, or -1 if not found.