Export to GitHub

mili - issue #48

separator-generic CSV parser


Posted on Jan 2, 2012 by Helpful Lion

Please improve the parser of the stream-utils library. Currently, it works for whitespace-separated values. It should work with ',' or any other specified separator (e.g. "-", ";"). For example: value,value, value ,value

This is a very important issue. Probably before or after of the error checking issue.

Pls ensure it works for STL containers (vector, list, and set at least).

Note that phyloloc depends on this library, ensure it still works afterwards, and also enjoys of the new functionality (currently, location failes are whitespace-separated, and should be comma-separated).

Comment #1

Posted on Jan 2, 2012 by Helpful Bear

Comment deleted

Comment #2

Posted on Jan 2, 2012 by Helpful Bear

Comment deleted

Comment #3

Posted on Jan 2, 2012 by Helpful Bear

(No comment was entered for this change.)

Comment #4

Posted on Jan 2, 2012 by Helpful Lion

Just provide basic delimiting functionality, as a symmetric counterpart of the output part, by using the delimiter argument of getline. Nothing fancy, just use ::getline.

Comment #5

Posted on Feb 21, 2012 by Quick Hippo

Currently there is a test testReadWithGenericSeparator in stream-utils_test.cpp which can be useful in order to check the parser behaviour.

Status: New

Labels:
Type-Enhancement Priority-Medium