[−][src]Trait no_comment::IntoWithoutComments
A trait to implement the without_comments
method on all Iterator<Item=char>
Provided methods
fn without_comments(self, language: Box<[Comment]>) -> WithoutComments<Self>
Returns a WithoutComments
iterator containing self
Arguments
language
- A boxed slice containing all the comments that the returned iterator will be removing
Example
use no_comment::{IntoWithoutComments, languages}; let with_comments = "S/*he */be/*lie*/ve//d"; let without_comments = with_comments .chars() .without_comments(languages::rust()) .collect::<String>(); assert_eq!(&without_comments, "Sbeve");