string is rarely useful as a function argument

Timon Gehr timon.gehr at gmx.ch
Fri Dec 30 14:40:07 PST 2011


On 12/30/2011 11:01 PM, Walter Bright wrote:
> On 12/30/2011 11:55 AM, Timon Gehr wrote:
>> Me too. I think the way we have it now is optimal.
>
> Consider your X macro implementation. Strip out the utf.stride code and
> use plain indexing - it will not break the code in any way. The naive
> implementation still works correctly with ASCII and UTF-8.
>

You are right, that obviously needs fixing. ☺
Thanks!

> That's not true for any other multibyte encoding, which is why UTF-8 is
> inspired genius.


More information about the Digitalmars-d mailing list