rust_string_utils::utils::indexFunction index_of
Source pub fn index_of(str: &String, search: &String) -> i32
Expand description
Finds the index of the first occurrence of the specified substring.
§Arguments
str
- The String
to search within.
search
- The String
to search for.
§Returns
The index of the first occurrence of the specified substring, or -1
if the substring is not found.