pub fn concat<C: Cost>(xs: impl IntoIterator<Item = Doc<C>>) -> Doc<C>Expand description
Concatenates several documents into one.
Equivalent to calling &/u_append successively to
combine the documents in the iterator. If the iterator is empty, it
returns text("").
ยงExample
let doc = concat([text("hello"), space(), text("world")]);
assert_eq!(doc.to_string(), "hello world");
let doc = concat([]);
assert_eq!(doc.to_string(), "");