On Friday, 16 October 2015 at 12:43:59 UTC, Meta wrote:
On Friday, 16 October 2015 at 10:38:52 UTC, Shriramana Sharma
wrote:
Is there a particular reason that File.byLine() returns char[]
and not string i.e. immutable(char)[]? Is it just to avoid
being overly restrictive? It seems that having
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".
V Sun, 18 Oct 2015 15:51:13 +
Suliman via Digitalmars-d-learn
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"?
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).
On Sunday, 18 October 2015 at 15:03:22 UTC, Suliman wrote:
Sorry, but could you explain more simply? I reread all
information, bit can't understand about what buffer you are
talking.
This is more or less how byLine works, simplified:
struct ByLine
{
File file;
char[] line;
char[]
Is there a particular reason that File.byLine() returns char[] and not
string i.e. immutable(char)[]? Is it just to avoid being overly restrictive?
It seems that having to .idup it is inefficient...
--
Shriramana Sharma, Penguin #395953
Shriramana Sharma píše v Pá 16. 10. 2015 v 16:08 +0530:
> Is there a particular reason that File.byLine() returns char[] and
> not
> string i.e. immutable(char)[]? Is it just to avoid being overly
> restrictive?
> It seems that having to .idup it is inefficient...
>
You need to do dup or idup
On Friday, 16 October 2015 at 10:38:52 UTC, Shriramana Sharma
wrote:
Is there a particular reason that File.byLine() returns char[]
and not string i.e. immutable(char)[]? Is it just to avoid
being overly restrictive? It seems that having to .idup it is
inefficient...
byLine reuses an
http://dlang.org/phobos/std_stdio.html#.File.byLineCopy
Thanks people, for the replies. That's very clear now.
--
Shriramana Sharma, Penguin #395953
10 matches
Mail list logo