Function tarrasque::be_i16

source ·
pub fn be_i16(bytes: &[u8]) -> i16
Expand description

Returns the first two bytes in the supplied slice as a big-endian i16.

Example

let bytes = &[1, 2, 3, 4, 5, 6, 7, 8];
assert_eq!(be_i16(bytes), 0x0102);