Trait collections::slice::PartialEqSliceExtUnstable
[-]
[+]
[src]
pub trait PartialEqSliceExt<T: PartialEq<T>> { fn position_elem(&self, t: &T) -> Option<uint>; fn rposition_elem(&self, t: &T) -> Option<uint>; fn contains(&self, x: &T) -> bool; fn starts_with(&self, needle: &[T]) -> bool; fn ends_with(&self, needle: &[T]) -> bool; }
Extension methods for slices containing PartialEq
elements.
Required Methods
fn position_elem(&self, t: &T) -> Option<uint>
Find the first index containing a matching value.
fn rposition_elem(&self, t: &T) -> Option<uint>
Find the last index containing a matching value.
fn contains(&self, x: &T) -> bool
Return true if the slice contains an element with the given value.
fn starts_with(&self, needle: &[T]) -> bool
Returns true if needle
is a prefix of the slice.
fn ends_with(&self, needle: &[T]) -> bool
Returns true if needle
is a suffix of the slice.
Implementors
impl<T: PartialEq<T>> PartialEqSliceExt<T> for [T]