pub fn index_of_j(
haystack: &JsString,
needle: JsStr<'_>,
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.