std.range.byLine
H. S. Teoh via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Sep 11 15:37:53 PDT 2014
On Thu, Sep 11, 2014 at 10:31:33PM +0000, "Nordlöw" via Digitalmars-d-learn wrote:
> On Thursday, 11 September 2014 at 21:54:39 UTC, Nordlöw wrote:
> >Anyway, it shouldn't be too hard to express this in a new range.
>
> I guess what we need is a variant of splitter with a more greedy alias
> template parameter that will digest two or one bytes.
Why not just use std.regex?
foreach (line; myInput.split(regex(`\n|\r\n|\r`)))
{
...
}
T
--
The problem with the world is that everybody else is stupid.
More information about the Digitalmars-d-learn
mailing list