As of C++11, it's safe to preallocate std::[u16]string and write to the buffer via &s[0] (C++17 makes it possible via .data() as well).
As of C++11, it's safe to preallocate std::[u16]string and write to the buffer via &s[0] (C++17 makes it possible via .data() as well).