Re: How does one read file line by line / upto a specific delimeter of an MmFile?

2020-03-16 Thread H. S. Teoh via Digitalmars-d-learn
On Mon, Mar 16, 2020 at 01:09:08PM +, Adnan via Digitalmars-d-learn wrote: [...] > Would it be wasteful to cast the entire content into a const string? Why would it be? It's just reinterpreting a pointer. > Can a memory mapped file be read with a buffer? That totally defeats the purpose of

Re: How does one read file line by line / upto a specific delimeter of an MmFile?

2020-03-16 Thread Patrick Schluter via Digitalmars-d-learn
On Monday, 16 March 2020 at 13:09:08 UTC, Adnan wrote: On Sunday, 15 March 2020 at 00:37:35 UTC, H. S. Teoh wrote: On Sat, Mar 14, 2020 at 10:37:37PM +, Adnan via Digitalmars-d-learn wrote: [...] That's because a memory-mapped file appears directly in your program's memory address space

Re: How does one read file line by line / upto a specific delimeter of an MmFile?

2020-03-16 Thread Adnan via Digitalmars-d-learn
On Monday, 16 March 2020 at 13:09:08 UTC, Adnan wrote: On Sunday, 15 March 2020 at 00:37:35 UTC, H. S. Teoh wrote: On Sat, Mar 14, 2020 at 10:37:37PM +, Adnan via Digitalmars-d-learn wrote: https://dlang.org/library/std/mmfile/mm_file.html doesn't seem to specify anything similar to lines()

Re: How does one read file line by line / upto a specific delimeter of an MmFile?

2020-03-16 Thread Adnan via Digitalmars-d-learn
On Sunday, 15 March 2020 at 00:37:35 UTC, H. S. Teoh wrote: On Sat, Mar 14, 2020 at 10:37:37PM +, Adnan via Digitalmars-d-learn wrote: https://dlang.org/library/std/mmfile/mm_file.html doesn't seem to specify anything similar to lines() or byLine() or byLineCopy() etc. That's because a me

Re: How does one read file line by line / upto a specific delimeter of an MmFile?

2020-03-14 Thread H. S. Teoh via Digitalmars-d-learn
On Sat, Mar 14, 2020 at 10:37:37PM +, Adnan via Digitalmars-d-learn wrote: > https://dlang.org/library/std/mmfile/mm_file.html doesn't seem to > specify anything similar to lines() or byLine() or byLineCopy() etc. That's because a memory-mapped file appears directly in your program's memory ad

How does one read file line by line / upto a specific delimeter of an MmFile?

2020-03-14 Thread Adnan via Digitalmars-d-learn
https://dlang.org/library/std/mmfile/mm_file.html doesn't seem to specify anything similar to lines() or byLine() or byLineCopy() etc.