Closed arathorn2005 closed 10 years ago
As already discussed: Splitting a String by \n does not work if it is delimited by Windows-style delimiters.
On a side note: Why use a String anyway? What you want is a list of Integers and Xtend has nice List literals. Just use those =)
I can only comment from my csv experiences, since I'm not yet that fluent in Java. If I read it properly, you might want to detect the systems "default" by using something like
System.getProperty("line.separator")
From a csv's perspective, I frequently coded different data separators. In this use case it wouldn't make that much sense, but generally a variable data separator might be of some help.
Oh, this is not a CSV parsing issue. It is a coding error in one of our classes itself. My comment was not directed at you, but at Alexander Nittka. I was talking about an implementation detail. Sorry to confuse you ;)
But you are right, CSV parsing could also be parametrized. Feel free to open another issue if you need support for other delimiters etc.
You can already specify the separator. However, this first quick and dirty implementation is not intended to be a full-fledged csv processor.
Totally agree. As mentioned yesterday, in most use cases it wouldn't make that much sense to implement every csv varations there is.
Fixed in master
While testing your class on different enviroments I've encountered an issue, which occurs when working on a windows machine:
The exact same command works within a linux enviroment and produces a valid result.
Additional information:
Thanks in advance!