Function encoding_rs::mem::convert_utf8_to_utf16_without_replacement [−][src]
Expand description
Converts potentially-invalid UTF-8 to valid UTF-16 signaling on error.
The length of the destination buffer must be at least the length of the source buffer.
Returns the number of u16
s written or None
if the input was invalid.
When the input was invalid, some output may have been written.
Panics
Panics if the destination buffer is shorter than stated above.