let get_uint16 str off = (if (off < 0) || (off > ((String.length str) - 2)) then raise (Invalid_argument "index out of bounds") else (); unsafe_get_uint16 str off)