index_of

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.

Parameters

Returns

The character index of the first occurrence.