toUTF16

fnwstring toUTF16(S)(S s) if (isSomeFiniteCharInputRange!S)

Encodes the elements of s to UTF-16 and returns a newly GC allocated wstring of the elements.

Parameters

sthe range to encode

Returns

A UTF-16 string

See Also

For a lazy, non-allocating version of these functions, see byUTF.