slice_idx

Function slice_idx 

Source
pub fn slice_idx<T: PartialEq>(arr: &[T], elem: &T) -> i32
Expand description

Find the index of an element in a slice. Returns -1 if not found.