<div class="gmail_quote">On Wed, Jun 27, 2012 at 5:38 PM, Timon Gehr <span dir="ltr"><<a href="mailto:timon.gehr@gmx.ch" target="_blank">timon.gehr@gmx.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 06/27/2012 03:25 PM, Gor Gyolchanyan wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Are there functions, which wrap arbitrary range types into standard<br>
range interfaces?<br>
I looked at the docs, but couldn't find anything.<br>
Use case:<br>
<br>
RandomAccessRange!dchar s = ???("Hello, world!");<br>
<br>
--<br>
Bye,<br>
Gor Gyolchanyan.<br>
</blockquote>
<br></div></div>
A narrow string is not a RandomAccessRange.<br>
<br>
RandomAccessFinite!(immutable(<u></u>dchar)) s = inputRangeObject("Hello, world!"d);<br>
</blockquote></div><br>I tested it out and the string literal without qualifiers counts as a dstring.<br clear="all"><div><br></div>-- <br>Bye,<br>Gor Gyolchanyan.<br>