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.
string str = "Hello, World!"; const(wchar)* p = str.toUTF16z; assert(p[str.length] == '\0');
See Implementation
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.