the range to encode
A UTF-32 string
import std.algorithm.comparison : equal; // these graphemes are two code units in UTF-16 and one in UTF-32 assert("𤭢"w.length == 2); assert("𐐷"w.length == 2); assert("𤭢"w.toUTF32.equal([0x00024B62])); assert("𐐷"w.toUTF32.equal([0x00010437]));
For a lazy, non-allocating version of these functions, see byUTF.
Encodes the elements of s to UTF-32 and returns a newly GC allocated dstring of the elements.