Split range that has no length or slice?

2015-11-09 Thread Spacen Jasset via Digitalmars-d-learn
I can't seem to find a way of splitting a range of characters into lines unless the range has a length or can be sliced? This presumably is because i is a range of chunks, which cannot have a length or a slice. I do not see how to get anything else from the File object at the moment. import

Re: Split range that has no length or slice?

2015-11-09 Thread Adam D. Ruppe via Digitalmars-d-learn
File has a .byLine and .byLineCopy method you could use to just get lines from it.

Re: Split range that has no length or slice?

2015-11-09 Thread Spacen Jasset via Digitalmars-d-learn
On Monday, 9 November 2015 at 18:04:23 UTC, Alex Parrill wrote: On Monday, 9 November 2015 at 17:56:14 UTC, Alex Parrill wrote: On Monday, 9 November 2015 at 15:23:21 UTC, Spacen Jasset wrote: On Monday, 9 November 2015 at 14:58:19 UTC, Adam D. Ruppe wrote: File has a .byLine and .byLineCopy

Re: Split range that has no length or slice?

2015-11-09 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 9 November 2015 at 15:23:21 UTC, Spacen Jasset wrote: On Monday, 9 November 2015 at 14:58:19 UTC, Adam D. Ruppe wrote: File has a .byLine and .byLineCopy method you could use to just get lines from it. Ah yes. but unfortunately I don't want to do that. I want to pass a range into

Re: Split range that has no length or slice?

2015-11-09 Thread Alex Parrill via Digitalmars-d-learn
On Monday, 9 November 2015 at 17:56:14 UTC, Alex Parrill wrote: On Monday, 9 November 2015 at 15:23:21 UTC, Spacen Jasset wrote: On Monday, 9 November 2015 at 14:58:19 UTC, Adam D. Ruppe wrote: File has a .byLine and .byLineCopy method you could use to just get lines from it. Ah yes. but

Re: Split range that has no length or slice?

2015-11-09 Thread Spacen Jasset via Digitalmars-d-learn
On Monday, 9 November 2015 at 14:58:19 UTC, Adam D. Ruppe wrote: File has a .byLine and .byLineCopy method you could use to just get lines from it. Ah yes. but unfortunately I don't want to do that. I want to pass a range into my print function. i.e. Sometimes it may not be a File, it might