Calling a C Function with C-style Strings
Dicebot
public at dicebot.lv
Sat Nov 30 11:24:00 PST 2013
On Saturday, 30 November 2013 at 18:58:30 UTC, Ali Çehreli wrote:
> 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
Hm, yes, this also sounds like a valid concern. I thought that
for literals \0 is part of actual string but after making a quick
check it looks "hidden" behind actual length. So yep, perfectly
wrong answer from me :)
More information about the Digitalmars-d-learn
mailing list