WCharzBuffer

A helper object for temporarily constructing a string appropriate for the Windows API from a D UTF-8 string.

More...

Constructors

this
this(char[] data, int conversionFlags)

conversionFlags = WindowsStringConversionFlags

Members

Functions

copyInto
void copyInto(R r)

Copies it into a static array of wchars

length
size_t length()

Length of the string, excluding the zero terminator.

slice
wchar[] slice()

Returns the slice of the internal buffer, excluding the zero terminator (though there is one present right off the end of the slice). You must assume its lifetime is less than that of the WCharzBuffer.

Detailed Description

It will use a small internal static buffer is possible, and allocate a new buffer if the string is too big.

Meta

History

Moved from simpledisplay.d to core.d in March 2023 (dub v11.0).