<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 10 January 2014 00:34, John Colvin <span dir="ltr"><<a href="mailto:john.loughran.colvin@gmail.com" target="_blank">john.loughran.colvin@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thursday, 9 January 2014 at 14:08:02 UTC, Manu wrote:<br>
</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This works fine:<br>
  string x = find("Hello", 'H');<br>
<br>
This doesn't:<br>
  string y = find(retro("Hello"), 'H');<br>
  > Error: cannot implicitly convert expression (find(retro("Hello"), 'H'))<br>
of type Result!() to string<br>
</blockquote>
<br></div>
In order to return the result as a string it would require an allocation. You have to request that allocation (and associated eager evaluation) explicitly<br>
<br>
string y = "Hello".retro.find('H').to!<u></u>string;<br></blockquote><div><br></div><div>Ah yes. Well I really just want the offset anyway...</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

However, I think to get the expected result from unicode you need<br>
<br>
string y = "Hello".byGrapheme.retro.find(<u></u>'H').to!string;<br>
<br>
but I might be wrong.<br>
</blockquote></div><br></div><div class="gmail_extra">Bugger that. This is not an example of "D is good at strings!".</div></div>