string is rarely useful as a function argument

Timon Gehr timon.gehr at gmx.ch
Sun Jan 1 04:59:26 PST 2012


On 01/01/2012 05:53 AM, Chad J wrote:
>
> If you haven't been educated about unicode or how D handles it, you
> might write this:
>
> char[] str;
> ... load str ...
> for ( int i = 0; i<  str.length; i++ )
> {
>      font.render(str[i]); // Ewww.
>      ...
> }
>

That actually looks like a bug that might happen in real world code. 
What is the signature of font.render?


More information about the Digitalmars-d mailing list