[−][src]Function display_utils::concat
pub fn concat<I>(iterator: I) -> impl Display where
I: IntoIterator,
I::Item: Display,
I::IntoIter: Clone,
Concatenate the contents of an iterator.
If you want to insert a separator inbetween elements, use join
or join_format
.
let string = String::from("It's not much, but it's honest work"); assert_eq!(concat(&[ &string[11..13], &string[25..27], &string[34..35], ]).to_string(), "chonk");