readline from char[]

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Sun May 6 03:12:07 PDT 2007


Jan Hanselaer wrote:
> Is it possible to read lines from a char[] buffer? I ask this because 
> reading lines directly from a file (with a BufferedStream) seems to be very 
> slow.
> So when I can first load my file
> 
> char[] file = cast(char[])std.file.read("filename");
> 
> and then read lines from file that would go faster I presume.
> 
> But I don't see a way to do this.
> 
> Anyone with an idea for this problem?

Did you try a MemoryStream? (I have no idea about the performance)


More information about the Digitalmars-d-learn mailing list