Function WireCursor.take

Borrow the next count bytes and advance the cursor.

bool take(
  ulong count,
  out const(ubyte)[] bytes
) nothrow @nogc @safe;

Parameters

NameDescription
count Number of bytes to borrow.
bytes Receives a slice into the original input on success.

Returns

true if count bytes were available; false otherwise.

Notes

The returned slice owns no memory and is valid only while the original input storage remains valid.