Struct SplitN
pub struct SplitN<'r, 'h> { /* private fields */ }
An iterator over at most N substrings delimited by a regex match.
The last substring yielded by this iterator will be whatever remains after
N-1 splits.
'r is the lifetime of the compiled regular expression and 'h is the
lifetime of the byte string being split.
This iterator is created by Regex::splitn.
Time complexity
Note that since an iterator runs potentially many searches on the haystack
and since each search has worst case O(m * n) time complexity, the
overall worst case time complexity for iteration is O(m * n^2).
Although note that the worst case time here has an upper bound given
by the limit parameter to Regex::splitn.
Trait Implementations
impl<'r, 'h> Debug for SplitN<'r, 'h>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'r, 'h> FusedIterator for SplitN<'r, 'h>
impl<'r, 'h> Iterator for SplitN<'r, 'h>
type Item = &'h str;fn next(&mut self) -> Option<&'h str>fn size_hint(&self) -> (usize, Option<usize>)