pub fn index_of(haystack: &str, needle: &str, from_index: i64) -> Result<i64>Expand description
JavaScript-like indexOf(search, fromIndex) using UTF-16 code-unit indices.
Returns the first match index, or -1 if not found.
Note: JS returns min(fromIndex, len) when search is the empty string.