Struct SplitInclusive
struct SplitInclusive<'a, P: Pattern>(_)
An iterator over the substrings of a string,
terminated by a substring matching to a predicate function
Unlike Split, it contains the matched part as a terminator
of the subslice.
This struct is created by the split_inclusive method on str.
See its documentation for more.
Implementations
impl<'a, P: Pattern> SplitInclusive<'a, P>
fn remainder(self: &Self) -> Option<&'a str>Returns remainder of the split string.
If the iterator is empty, returns
None.Examples
let mut split = "Mary had a little lamb".split_inclusive; assert_eq!; split.next; assert_eq!; split.by_ref.for_each; assert_eq!;
impl<'a, P> Freeze for SplitInclusive<'a, P>
impl<'a, P> RefUnwindSafe for SplitInclusive<'a, P>
impl<'a, P> Send for SplitInclusive<'a, P>
impl<'a, P> Sync for SplitInclusive<'a, P>
impl<'a, P> Unpin for SplitInclusive<'a, P>
impl<'a, P> UnsafeUnpin for SplitInclusive<'a, P>
impl<'a, P> UnwindSafe for SplitInclusive<'a, P>
impl<'a, P: Pattern> FusedIterator for SplitInclusive<'a, P>
impl<'a, P: Pattern> Iterator for SplitInclusive<'a, P>
fn next(self: &mut Self) -> Option<&'a str>
impl<'a, P: Pattern<Searcher<'a>: Clone>> Clone for SplitInclusive<'a, P>
fn clone(self: &Self) -> Self
impl<'a, P: Pattern<Searcher<'a>: DoubleEndedSearcher<'a>>> DoubleEndedIterator for SplitInclusive<'a, P>
fn next_back(self: &mut Self) -> Option<&'a str>
impl<'a, P: Pattern<Searcher<'a>: fmt::Debug>> Debug for SplitInclusive<'a, P>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<I> IntoIterator for SplitInclusive<'a, P>
fn into_iter(self: Self) -> I
impl<T> Any for SplitInclusive<'a, P>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for SplitInclusive<'a, P>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for SplitInclusive<'a, P>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for SplitInclusive<'a, P>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for SplitInclusive<'a, P>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into for SplitInclusive<'a, P>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for SplitInclusive<'a, P>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for SplitInclusive<'a, P>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>