Struct std_prelude::str::Chars1.0.0 [] [src]

pub struct Chars<'a> { /* fields omitted */ }

An iterator over the chars of a string slice.

This struct is created by the chars method on str. See its documentation for more.

Methods

impl<'a> Chars<'a>
[src]

1.4.0
[src]

View the underlying data as a subslice of the original data.

This has the same lifetime as the original slice, and so the iterator can continue to be used while this exists.

Examples

let mut chars = "abc".chars();

assert_eq!(chars.as_str(), "abc");
chars.next();
assert_eq!(chars.as_str(), "bc");
chars.next();
chars.next();
assert_eq!(chars.as_str(), "");

Trait Implementations

impl<'a> Debug for Chars<'a>
[src]

[src]

Formats the value using the given formatter.

impl<'a> FusedIterator for Chars<'a>
[src]

impl<'a> Clone for Chars<'a>
[src]

[src]

impl<'a> Iterator for Chars<'a>
[src]

[src]

[src]

[src]

[src]

impl<'a> DoubleEndedIterator for Chars<'a>
[src]

[src]