[][src]Trait no_comment::IntoWithoutComments

pub trait IntoWithoutComments where
    Self: Sized + Iterator<Item = char>, 
{ fn without_comments(self) -> WithoutComments<Self> { ... } }

A trait to implement the without_comments method on all Iterator<Item=char>

Provided methods

fn without_comments(self) -> WithoutComments<Self>

Returns a WithoutComments iterator containing self

Example

use no_comment::IntoWithoutComments;
let with_comments = "S/*he */be/*lie*/ve//d";
let without_comments = with_comments.chars().without_comments().collect::<String>();
assert_eq!(&without_comments, "Sbeve");
Loading content...

Implementors

impl<I: Iterator<Item = char>> IntoWithoutComments for I[src]

Blanket implementation

Loading content...