Find index of substring
Returns the character index of the first occurrence of
sub in s, or -1 if not found. Indices are
character-based (Unicode code points), matching
str_substring and char_at.
s (String): The search
string.
sub (String): The substring to
find.
The character index of the first occurrence.