toUTF16z
fn
const(wchar) * toUTF16z(C)(const(C)[] str) if (isSomeChar!C) @safe puretoUTF16z is a convenience function for toUTFz!(const(wchar)*).
Encodes string s into UTF-16 and returns the encoded string. toUTF16z is suitable for calling the 'W' functions in the Win32 API that take an LPCWSTR argument.