toWStringz

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

version(Windows)
nothrow
wchar[]
toWStringz
(
const(char)[] narrow
,
wchar[] buffer = null
)

Return Value

Type: wchar[]

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 narrow is null, the returned slice is null too.

Meta