Programming Windows D Examples are now Online!

Walter Bright newshound2 at digitalmars.com
Tue Jun 21 17:28:01 PDT 2011


On 6/21/2011 1:46 PM, Andrej Mitrovic wrote:
>> 	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 think there's a misunderstanding somewhere. strlen() works just fine on UTF-8 
code.


More information about the Digitalmars-d-announce mailing list