Programming Windows D Examples are now Online!

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Jun 21 13:46:04 PDT 2011


On 6/21/11, Walter Bright <newshound2 at digitalmars.com> wrote:
> Fix:
>
>         char[100] buffer = 0;

I didn't know about this syntax! I've been under a rock apparently.

> Fix:
> 	char[100] buffer;
> 	APIWriteToBuffer(buffer.ptr);
>          auto p = buffer[0 .. strlen(buffer.ptr)];
> 	myDStringFunction(p);
>

Yeah I was going to suggest that. My only problem was I didn't know
where to look for an strlen equivalent for UTF, but I found it in
std.utf and it's called stride().

I'll fix these examples soon. I'll give a thought or two about that
blogging idea as well, thanks.


More information about the Digitalmars-d-announce mailing list