std.csv.csvReader operating on File.byLine()

Rene Zwanenburg renezwanenburg at gmail.com
Sun Oct 7 16:00:45 PDT 2012


On Sunday, 7 October 2012 at 22:31:05 UTC, Dmitry Olshansky wrote:
> On 08-Oct-12 01:42, Rene Zwanenburg wrote:
>> Ah yes, I understand. Thanks.
>>
>> For the sake of cleanliness (and Walter's article on component
>> programming ;) ), is there a way to treat a file as an 
>> InputRange of
>> characters? I think this is quite a common use case.
>>
>
> IRC something along the lines of:
>
> foreach(dchar ch; LockingTextReader(file))
> {
> ...
> }

LockingTextReader is exactly what I was looking for. Thanks.


More information about the Digitalmars-d-learn mailing list