This currently makes an extra copy of the data, but that would be fixed by adding a CodeUnits
slicing method that allocates the copy using StringVector
(so that String(...)
will take ownership of the new array).
This doesn’t help with the SubString
case, though.