toCString

fnconst(char) * toCString(string s) pure nothrow

Converts a D string to a null-terminated C string.

The returned pointer is only valid as long as the D string s and its associated GC memory remain alive. For computed or temporary strings, use toOwnedCString instead.

Parameters

sThe D string to convert.

Returns

A null-terminated C string.