peek
fn
T peek(T, Endian endianness = Endian.bigEndian, R)(R range) if (canSwapEndianness!T &&
isForwardRange!R &&
is(ElementType!R : const ubyte))Takes a range of ubytes and converts the first T.sizeof bytes to T. The value returned is converted from the given endianness to the native endianness. The range is not consumed.
Parameters
T | The integral type to convert the first T.sizeof bytes to. |
endianness | The endianness that the bytes are assumed to be in. |
range | The range to read from. |
index | The index to start reading from (instead of starting at the front). If index is a pointer, then it is updated to the index after the bytes read. The overloads with index are only available if hasSlicing!R is true. |