splitting numbers from a test file

Jonathan M Davis jmdavisProg at gmx.com
Tue Sep 18 23:27:35 PDT 2012


On Wednesday, September 19, 2012 06:56:23 Craig Dillabaugh wrote:
> From:
> http://dlang.org/phobos/std_array.html#splitter

Ah. I was looking at std.algorithm.splitter (which operates on generic ranges 
and separators) which _does_ explicitly say that it returns a range.

Yeah. The documentation on std.array.splitter is incredibly sparse. It doesn't 
even state the result is lazy (though if it did, it would be bound to say that 
it was a lazy range, which would then mean that it was stating that the return 
type was a range), making the difference between it and split not at all 
obvious. That should be fixed. Internally, it just does

return std.algorithm.splitter!(std.uni.isWhite)(s);

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list