Creating InputRanges from strings, files etc.

Vinay Sajip vinay_sajip at yahoo.co.uk
Thu Nov 8 13:58:55 UTC 2018


Excuse my ignorance, but from looking at the documentation on 
std.range and a quick skim of the guides mentioned there near the 
top, I can't see what the simple way is of creating an 
InputRange!(ubyte) from strings, files etc. I would have expected 
to find something in the DLang Tour about this, but couldn't find 
anything. Please can someone tell me how to do it? Just to be 
clear, I want to create an object which is an InputRange!(ubyte) 
and pass that around, rather than e.g. iterate over a string or a 
file.


More information about the Digitalmars-d-learn mailing list