toNarrowStringz

Converts a UTF-16 string to a (null-terminated) narrow string.

version(Windows)
nothrow
char[]
toNarrowStringz
(
const(wchar)[] wide
,
char[] buffer = null
)

Return Value

Type: char[]

If buffer is specified and the result fits, a slice of that buffer, otherwise a new buffer which can be released via mem.xfree(). Nulls are propagated, i.e., if wide is null, the returned slice is null too.

Meta