Skip to main content

Module iter

Module iter 

Source
Expand description

Iterators for str methods.

Re-exportsยง

use super::pattern::DoubleEndedSearcher; ๐Ÿ”’ Experimental
use super::pattern::Pattern; ๐Ÿ”’ Experimental
use super::pattern::ReverseSearcher; ๐Ÿ”’ Experimental
use super::pattern::Searcher; ๐Ÿ”’ Experimental
use super::validations::next_code_point; ๐Ÿ”’ Experimental
use super::validations::next_code_point_reverse; ๐Ÿ”’
use super::BytesIsNotEmpty; ๐Ÿ”’
use super::CharEscapeDebug; ๐Ÿ”’
use super::CharEscapeDefault; ๐Ÿ”’
use super::CharEscapeUnicode; ๐Ÿ”’
use super::IsAsciiWhitespace; ๐Ÿ”’
use super::IsNotEmpty; ๐Ÿ”’
use super::IsWhitespace; ๐Ÿ”’
use super::LinesMap; ๐Ÿ”’
use super::UnsafeBytesToStr; ๐Ÿ”’
use super::from_utf8_unchecked; ๐Ÿ”’
use crate::char as char_mod; ๐Ÿ”’
use crate::fmt; ๐Ÿ”’
use crate::fmt::Write; ๐Ÿ”’
use crate::iter::Copied; ๐Ÿ”’
use crate::iter::Filter; ๐Ÿ”’
use crate::iter::FlatMap; ๐Ÿ”’
use crate::iter::FusedIterator; ๐Ÿ”’
use crate::iter::Map; ๐Ÿ”’
use crate::iter::TrustedLen; ๐Ÿ”’ Experimental
use crate::iter::TrustedRandomAccess; ๐Ÿ”’ Experimental
use crate::iter::TrustedRandomAccessNoCoerce; ๐Ÿ”’ Experimental
use crate::num::NonZero; ๐Ÿ”’
use crate::ops::Try; ๐Ÿ”’ Experimental
use crate::slice; ๐Ÿ”’
use crate::slice::Split as SliceSplit; ๐Ÿ”’

Macrosยง

derive_pattern_clone ๐Ÿ”’
This macro generates a Clone impl for string pattern API wrapper types of the form X<โ€™a, P>
escape_types_impls ๐Ÿ”’
generate_pattern_iterators ๐Ÿ”’
This macro generates two public iterator structs wrapping a private internal one that makes use of the Pattern API.

Structsยง

Bytes
An iterator over the bytes of a string slice.
CharIndices
An iterator over the chars of a string slice, and their positions.
Chars
An iterator over the chars of a string slice.
EncodeUtf16
An iterator of u16 over the string encoded as UTF-16.
EscapeDebug
The return type of str::escape_debug.
EscapeDefault
The return type of str::escape_default.
EscapeUnicode
The return type of str::escape_unicode.
Lines
An iterator over the lines of a string, as string slices.
LinesAnyDeprecated
Created with the method lines_any.
MatchIndices
Created with the method match_indices.
MatchIndicesInternal ๐Ÿ”’
Matches
Created with the method matches.
MatchesInternal ๐Ÿ”’
RMatchIndices
Created with the method rmatch_indices.
RMatches
Created with the method rmatches.
RSplit
Created with the method rsplit.
RSplitN
Created with the method rsplitn.
RSplitTerminator
Created with the method rsplit_terminator.
Split
Created with the method split.
SplitAsciiWhitespace
An iterator over the non-ASCII-whitespace substrings of a string, separated by any amount of ASCII whitespace.
SplitInclusive
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.
SplitInternal ๐Ÿ”’
SplitN
Created with the method splitn.
SplitNInternal ๐Ÿ”’
SplitTerminator
Created with the method split_terminator.
SplitWhitespace
An iterator over the non-whitespace substrings of a string, separated by any amount of whitespace.