It is handy to be able to transfer ownership of a Vector<UChar> into a UString without having to memcpy the contents of the vector. This can be done with the public API of UString, but it would be more convenient to have a UString::adopt(Vector<UChar>&) method.
Created attachment 22278 [details] patch
Comment on attachment 22278 [details] patch I would rather we remove non-copying version of the UString constructor and only use adopt.
Created attachment 22287 [details] non-perf tested version of what I was thinking
> I would rather we remove non-copying version of the UString constructor and > only use adopt. Yes, that's a good idea. The non-copying constructor is just asking for memory errors.
This now exists!