Function fmty::csv

source ·
pub fn csv<I>(iter: I) -> Csv<I::IntoIter>where
    I: IntoIterator,
    I::IntoIter: Clone,
Expand description

Concatenates Iterator items with , between each.

This is equivalent to join(iter, ", ").

If Clone for the Iterator is too expensive, consider using csv_once().

Examples

let value = fmty::csv(["hola", "mundo"]);
assert_eq!(value.to_string(), "hola, mundo");