Formats an array (or a single scalar, treated as a one-column row) as a CSV row string. A field is quoted when quoteAll is true or the field contains the delimiter, the quote character, or a newline; the quote and escape characters are doubled inside quoted fields. A null element produces an empty, unquoted field. This matches the opencsv behaviour of the Java CSV shim, keeping round-trips byte-identical.
csvFormatRow(values [, delimiter] [, quote] [, escape] [, quoteAll])
→ returns string
,""truetruefalseQuote-all formatting of a simple array.
writeDump(csvFormatRow(["Alice", 90, "said \"hi\""]));
Expected Result: "Alice","90","said \"hi\""
Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.