catbuf_match - match bytes in a data buffer
#include <cat.h>
int catbuf_match(cat_buffer *b, const void *data, int datalen);
This function counts the number of bytes from data that match the bytes stored in buffer b, starting from the current index in buffer
b. datalen is the length of data in bytes.
The function searches only from the current index (that is, the function
does not automatically increase the index and search the rest of the
buffer).
This function does not change the buffer index.
Returns the number of bytes that matched the specified bytes.
cat, catbuf, catbuf_scan