Data.shiftTo()
Description
Removes bytes from the beginning up to the first byte where user callback returns true.
The scanner parameter will be called once for each byte in Data. It returns truthy to indicate the last byte to shift out. Compare to shiftWhile().
Syntax
data.shift(byte => shouldKeepAfter(byte))
Parameters
shiftTo(callback)
callback
A function that receives each byte being removed and returns true for the last byte to remove.
Return Value
A Data object containing bytes removed from the beginning.