fromStringz

Returns a D-style array of char given a zero-terminated C-style string. The returned array will retain the same type qualifiers as the input.

Important Note: The returned array is a slice of the original buffer. The original data is not changed and not copied.

inout(char)[]
fromStringz
@system pure
(
inout(char)* cString
)

Examples

assert(fromStringz(null) == null);
assert(fromStringz("foo") == "foo");

Meta