toStringz

fnconst(char) * toStringz(string s) @trusted pure nothrow @nogc

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

This function returns a pointer to the internal buffer of the string with a null terminator. The returned pointer is only valid as long as the original string is not modified or garbage collected.

Parameters

sThe D string to convert

Returns

A pointer to the null-terminated string, or null if input is null