On 7/16/2011 3:25 PM, Willy Martinez wrote:
I was wondering if there's a tutorial available on how to write simple ranges.
Something like what I'm trying to do: Skip whitespace from text read from a
file.
It's difficult to search for "d ranges tutorial" in Google.
Thanks
I found the best place to learn about ranges was simply the std.range
documentation http://www.d-programming-language.org/phobos/std_range.html
For example, you can see what an input range is by looking at the
isInputRange template.
However, for what you want, you can use std.algorithm.filter