On Tuesday, 2 October 2012 at 02:22:33 UTC, Steven Schveighoffer wrote:
@system char[] zstr(char *s) { return s[0..strlen(s)]; }

[…]

Does it make sense for Phobos to provide such a shortcut in an obscure header somewhere? Like std.cstring? Or should we just say "roll your own if you need it"?

I didn't look it up, so I could be making quite a fool of myself right now, but doesn't to!string(char*) provide exactly that?

David

Reply via email to