standard ranges

Timon Gehr timon.gehr at gmx.ch
Wed Jun 27 06:38:03 PDT 2012


On 06/27/2012 03:25 PM, Gor Gyolchanyan wrote:
> Are there functions, which wrap arbitrary range types into standard
> range interfaces?
> I looked at the docs, but couldn't find anything.
> Use case:
>
> RandomAccessRange!dchar s = ???("Hello, world!");
>
> --
> Bye,
> Gor Gyolchanyan.

A narrow string is not a RandomAccessRange.

RandomAccessFinite!(immutable(dchar)) s = inputRangeObject("Hello, 
world!"d);


More information about the Digitalmars-d mailing list