File csv.icn |
Process a properly formatted CSV file. You can change the separator from the default , to any set of characters using the --separator=CSET argument.
Each separator denotes a field separation (e.g. "a,,,b," contains five fields) unless you give the --span argument. If you give the --span argument, then the fields as considered to be separated by one or more spans of the separator instead of exactly one and the above input contains three fields instead of five (in both cases, the last field is the empty string).
Assumes that:
a. Fields containing the separator are enclosed in double
quotes.
b. Fields containing double quotes have those quotes
duplicated with the entire field inclosed in double
quotes.
c. Leading and trailing whitespace (blanks and tabs) are
to be removed unless used as separators.
d. Double quotes and newlines are never separators.
This file is part of the (main) package.
Source code.Details |
Procedures: |