pub fn to_csv<R, C, S>(rows: R) -> StringExpand description
The table as CSV: one record per row, fields separated by ,, records ended by CRLF
(RFC 4180 §2). See to_delimited.
use unparser_shared::csv::{to_csv, Cell};
let rows = [
vec![Cell::single("Item"), Cell::single("Note")],
vec![Cell::single("Bolt, M6"), Cell::single("He said \"no\"")],
];
assert_eq!(to_csv(rows), "Item,Note\r\n\"Bolt, M6\",\"He said \"\"no\"\"\"\r\n");