Function display_utils::concat [−][src]
pub fn concat<I>(iterator: I) -> Concat<I::IntoIter> 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
. If you
want to concatenate different types, use concat!
.
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");