null on allocation failure.toOwnedCString
fn
const(char) * toOwnedCString(string s) nothrowConverts a D string to a null-terminated C string backed by owned GC memory.
Unlike toCString, the returned pointer remains valid even after the original D string is garbage-collected, because the data is copied into a new GC allocation.
Parameters
s | The D string to convert. |
Returns
A null-terminated C string backed by owned GC memory, or