/// Convert a Rust UTF-8 `string` into a NUL-terminated UTF-16 vector
Convert a Rust UTF-8 `string` into a NUL-terminated UTF-16 vector
Convert a Rust UTF - 8 ` string ` into a NUL - terminated UTF - 16 vector
fn str_to_utf16(string: &str) -> Vec<u16> {
    let mut ret: Vec<u16> = string.encode_utf16().collect();
    ret.push(0);
    ret
}
fn str_to_utf16 ( string : & str ) -> Vec < u16 > { let mut ret : Vec < u16 > = string . encode_utf16 ( ) . collect ( ) ; ret . push ( 0 ) ; ret }
Convert a Rust UTF-8 `string` into a NUL-terminated UTF-16 vector
Convert a Rust UTF - 8 ` string ` into a NUL - terminated UTF - 16 vector
string
&str