Scan through the buffer for first byte matching value.
position of a match or -1
to be match
inclusive initial position to start searching
exclusive final position of the search