Skip to main content

escape_csv

Function escape_csv 

Source
pub fn escape_csv(s: &str) -> String
Expand description

Escape a string for CSV output (RFC-4180 style).

Values containing a comma, double quote, or line feed (\n — carriage returns do NOT trigger quoting, matching the prior copies byte-for-byte) are wrapped in double quotes with inner quotes doubled; everything else passes through unchanged.

The single implementation behind every CSV surface (rledger report --format csv, BQL CSV output) — these previously carried byte-identical private copies.