When the input contains a zero, these functions stop and ignore the rest of the input instead of emitting a perfectly valid U+0000 code point. Test case: ``` rust use std::str; fn main() { let a = "foo\0bar"; let b = a.to_utf16(); let c = str::from_utf16(b); println!("{:?}", a); println!("{:?}", b); println!("{:?}", c) } ``` Output: ``` "foo\x00bar" ~[102u16, 111u16, 111u16, 0u16, 98u16, 97u16, 114u16] ~"foo" ``` Expected output: ``` "foo\x00bar" ~[102u16, 111u16, 111u16, 0u16, 98u16, 97u16, 114u16] ~"foo\x00bar" ```