Speeding up text file parser (BLAST tabular format)

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Sep 15 06:01:01 PDT 2015


On Tuesday, 15 September 2015 at 09:19:29 UTC, John Colvin wrote:
>> It provides you only one char at a time instead of a whole 
>> line. It will be quite constraining for your code if not 
>> mind-bending.
>
> http://dlang.org/phobos/std_string.html#.lineSplitter
>
> File(fileName).byChunk(chunkSize).map!"cast(char[])a".joiner().lineSplitter()

lineSplitter doesn't work with input ranges.


More information about the Digitalmars-d-learn mailing list