D-Programming-Language/phobos — pull request #2332 by denis-sh (2014-07-13 16:58:15+00:00)
Title: Add temp c string allocation

As was written at [Opportunities for D](http://forum.dlang.org/thread/lphnen$1ml7$1@digitalmars.com) NG thread this is a desired direction.
Also this pull doesn't add any public API (for such proposal see [Add module for C-strings support in Phobos](http://forum.dlang.org/thread/lge8ju$2qcq$1@digitalmars.com) NG thread).

The proposed solution uses this clean syntax (in contrast to pull #2014):
```D
void setEnvironment(in char[] name, in char[] value)
{ enforce(setenv(name.tempCString(), value.tempCString(), 1) != -1); }
```

Added `std.internal.cstring` module contains ported code from [Unstandard library](http://denis-sh.bitbucket.org/unstandard/).

Also see D-Programming-Language/druntime#887.