doc.rust-lang.org
pub const fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])>
Returns the first and all the rest of the elements of the slice, or None if it is empty.
method
core
Stable since 1.5.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_first_chunk_mut<const N: usize>(&mut self) -> Option<(&mut [T; N], &mut [T])>
Returns a mutable array reference to the first N items in the slice and the remaining slice.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_first_chunk<const N: usize>(&self) -> Option<(&[T; N], &[T])>
Returns an array reference to the first N items in the slice and the remaining slice.
method
core
Stable since 1.77.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_first(&self) -> Option<(&T, &[T])>
Returns the first and all the rest of the elements of the slice, or None if it is empty.
method
core
Stable since 1.5.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn split_at_unchecked(&self, mid: usize) -> (&[T], &[T])
Divides one slice into two at an index, without doing bounds checking.
method
core
Stable since 1.79.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const unsafe fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut [T], &mut [T])
Divides one mutable slice into two at an index, without doing bounds checking.
method
core
Stable since 1.79.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])>
Divides one mutable slice into two at an index, returning None if the slice is too short.
method
core
Stable since 1.80.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T])
Divides one mutable slice into two at an index.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_at_checked(&self, mid: usize) -> Option<(&[T], &[T])>
Divides one slice into two at an index, returning None if the slice is too short.
method
core
Stable since 1.80.0
Version 1.100.0-nightly
doc.rust-lang.org
pub const fn split_at(&self, mid: usize) -> (&[T], &[T])
Divides one slice into two at an index.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn split<F>(&self, pred: F) -> Split<'_, T, F>
Returns an iterator over subslices separated by elements that match pred. The matched element is not contained in the subslices.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn sort_unstable_by_key<K, F>(&mut self, f: F)
Sorts the slice in ascending order with a key extraction function, without preserving the initial order of equal elements.
method
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn sort_unstable_by<F>(&mut self, compare: F)
Sorts the slice in ascending order with a comparison function, without preserving the initial order of equal elements.
method
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn sort_unstable(&mut self)
Sorts the slice in ascending order without preserving the initial order of equal elements.
method
core
Stable since 1.20.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn select_nth_unstable_by_key<K, F>(&mut self, index: usize, f: F) -> (&mut [T], &mut T, &mut [T])
Reorders the slice with a key extraction function such that the element at index is at a sort-order position. All elements before index will have keys <= to the key at index, and all elements after will have keys >= to it.
method
core
Stable since 1.49.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn select_nth_unstable_by<F>(&mut self, index: usize, compare: F) -> (&mut [T], &mut T, &mut [T])
Reorders the slice with a comparator function such that the element at index is at a sort-order position. All elements before index will be <= to this value, and all elements after will be >= to it, according to the comparator function.
method
core
Stable since 1.49.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn select_nth_unstable(&mut self, index: usize) -> (&mut [T], &mut T, &mut [T])
Reorders the slice such that the element at index is at a sort-order position. All elements before index will be <= to this value, and all elements after will be >= to it.
method
core
Stable since 1.49.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn rsplitn_mut<F>(&mut self, n: usize, pred: F) -> RSplitNMut<'_, T, F>
Returns an iterator over subslices separated by elements that match pred limited to returning at most n items. This starts at the end of the slice and works backwards. The matched element is not contained in the subslices.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn rsplitn<F>(&self, n: usize, pred: F) -> RSplitN<'_, T, F>
Returns an iterator over subslices separated by elements that match pred limited to returning at most n items. This starts at the end of the slice and works backwards. The matched element is not contained in the subslices.
method
core
Stable since 1.0.0
Version 1.100.0-nightly
doc.rust-lang.org
pub fn rsplit_mut<F>(&mut self, pred: F) -> RSplitMut<'_, T, F>
Returns an iterator over mutable subslices separated by elements that match pred, starting at the end of the slice and working backwards. The matched element is not contained in the subslices.
method
core
Stable since 1.27.0
Version 1.100.0-nightly