Idea: Introduce zero-terminated string specifier

deadalnix deadalnix at gmail.com
Sun Sep 30 11:31:23 PDT 2012


If you know that a string is 0 terminated, you can easily create a slice 
from it as follow :

char* myZeroTerminatedString;
char[]  myZeroTerminatedString[0 .. strlen(myZeroTerminatedString)];

It is clean and avoid to modify the stdlib in an unsafe way.


More information about the Digitalmars-d mailing list