index_of

Find index of substring

Returns the index of the first occurrence of sub in s, or -1 if not found.

Parameters

Returns

The index of the first occurrence.