fromStringz

Gets a slice from a null-terminated string.

@system @nogc pure nothrow
inout(T)[]
fromStringz
(
T
)
(
inout(T)* str
)

Parameters

str inout(T)*

the null terminated string to slice.

Return Value

Type: inout(T)[]

A new slice over the string, stopping before the null terminator. If str is not null terminated the return value is undefined and likely corrupted.

Meta