On 11/30/2013 07:58 AM, Dicebot wrote:

> char[] name = "alpha".dup;
> mktemp(name.ptr);
>
> D literals are zero-terminated so toStringz is only needed if you want
> to pass to C function slice of literal or some runtime input.

However, I doubt that .dup copies that '\0' character. Although the literal has the termination, we are in slice land beyond that literal so the termination must somehow be ensured.

Ali

Reply via email to