* - Add a test suite for input modules in general, and CSV in specific?
* Becomes more important with the multitude of options and their
* interaction. Could cover edge cases (BOM presence, line termination
* - Add a test suite for input modules in general, and CSV in specific?
* Becomes more important with the multitude of options and their
* interaction. Could cover edge cases (BOM presence, line termination
- return g_strsplit(buf, inc->delimiter->str, 0);
+ char **fields, *f;
+ size_t l;
+
+ fields = g_strsplit(buf, inc->delimiter->str, 0);
+ if (!fields)
+ return NULL;
+
+ l = g_strv_length(fields);
+ while (l--) {
+ f = fields[l];
+ g_strchomp(f);
+ }
+
+ return fields;