pub fn utf16be_to_char(
    data: &[u8],
) -> impl Iterator<Item = std::result::Result<char, std::char::DecodeUtf16Error>> + '_ {
    char::decode_utf16(data.chunks(2).map(|w| u16::from_be_bytes([w[0], w[1]])))
}
/// helper function to decode UTF-16-BE data
/// takes a slice of u8 and returns an iterator for char or an decoding error
helper function to decode UTF-16-BE data
takes a slice of u8 and returns an iterator for char or an decoding error
helper function to decode UTF - 16 - BE data takes a slice of u8 and returns an iterator for char or an decoding error
pub fn utf16be_to_char(
    data: &[u8],
) -> impl Iterator<Item = std::result::Result<char, std::char::DecodeUtf16Error>> + '_ {
    char::decode_utf16(data.chunks(2).map(|w| u16::from_be_bytes([w[0], w[1]])))
}
pub fn utf16be_to_char ( data : & [ u8 ] , ) -> impl Iterator < Item = std :: result :: Result < char , std :: char :: DecodeUtf16Error > > + ' _ { char :: decode_utf16 ( data . chunks ( 2 ) . map ( | w | u16 :: from_be_bytes ( [ w [ 0 ] , w [ 1 ] ] ) ) ) }
helper function to decode UTF-16-BE data
takes a slice of u8 and returns an iterator for char or an decoding error
helper function to decode UTF - 16 - BE data takes a slice of u8 and returns an iterator for char or an decoding error
data
&[u8]
data
&[u8]