string_index_of


string_index_of(s, ss, @optionaloffset = 0)
      

Return the index of the substring ss within the string s. Return -1 if the substring is not found.

The string s is searched starting at the index specified by offset. This must be a nonnegative integer less than the length of s.

Examples:


let s = "hello, world"          
string_index_of(s, "ll")
// 2
string_index_of(s, "o")
// 4
string_index_of(s, "o", 5)
// 8
      

Also see:

string_at
string_ends/starts_with


Core Module Index | Contents