toUTF16z

fnconst(wchar) * toUTF16z(C)(const(C)[] str) if (isSomeChar!C) @safe pure

toUTF16z 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.