Function encoding_rs::mem::convert_str_to_utf16
source · [−]Expand description
Converts valid UTF-8 to valid UTF-16.
The length of the destination buffer must be at least the length of the source buffer.
Returns the number of u16
s written.
Panics
Panics if the destination buffer is shorter than stated above.