LPOLESTR* to string

Jakob Ovrum jakobovrum at gmail.com
Mon Feb 10 14:06:12 PST 2014


On Monday, 10 February 2014 at 17:54:14 UTC, John Colvin wrote:
> Or if you're sure you don't have any wide characters:
>
> auto rgszNamesStr = to!string(rgszNames[0][0 .. 
> wcslen(rgszNames[0])]);

to!string on a well-formed UTF-16 string is always safe. It will 
transcode to UTF-8.


More information about the Digitalmars-d-learn mailing list