Why does File.byLine() return char[] and not string

Daniel Kozak via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Oct 18 09:25:43 PDT 2015


V Sun, 18 Oct 2015 15:51:13 +0000
Suliman via Digitalmars-d-learn <digitalmars-d-learn at puremagic.com>
napsáno:

> On Sunday, 18 October 2015 at 15:40:09 UTC, novice2 wrote:
> >> what buffer you are talking.  
> >
> > internal buffer. where result line resides.
> >
> >  
> >> And what is "signal"? How it's working?  
> >
> > just the fact for programmer, that result line can be changed 
> > by other code (by phobos library code in this case).
> >
> > no any special programming "signal".  
> 
> Am I right understand that byLine work like:
> read string, put it's to internal buffer, then read new line, 
> overwrite existent buffer etc...

Yes

> 
> byLineCopy is create range that storage all strings in format of 
> string, not char?
> 

byLineCopy is same as byLine, but do dup for each line

> What is size of this buffer, how it's calculate?

it is dynamic it depends on line length







More information about the Digitalmars-d-learn mailing list