CsvOutStream
@Js
class CsvOutStream : OutStream
CsvOutStream is used to write delimiter-separated values as specified by RFC 4180. Format details:
- rows are delimited by a newline
- cells are separated by delimiter char
- cells containing the delimiter,
"double quote, or newline are quoted; quotes are escaped as""
Also see CsvInStream.
Wrap the underlying output stream
Delimiter character
Return if the given cell string contains
Write a single cell
Write the row of cells with the configured delimiter
Int : delimiter
Delimiter character; defaults to comma.
Bool isQuoteRequired(Str cell)
Return if the given cell string contains:
- the configured delimiter
- double quote
"char - leading/trailing whitespace
- newlines
new make(OutStream out)
Wrap the underlying output stream.
virtual This writeCell(Str cell)
Write a single cell. If isQuoteRequired returns true, then quote it.
virtual This writeRow(Str[] row)
Write the row of cells with the configured delimiter. Also see writeCell.