NAME

catbuf_scan - search in buffer

SYNOPSIS

#include <cat.h>

int catbuf_scan(cat_buffer *b, const void *matchbytes, int nbytes);

DESCRIPTION

catbuf_scan() scans buffer b for the next occurrence of any of the bytes in matchbytes, starting at the current buffer index. nbytes contains the number of bytes in matchbytes.

This function does not affect the current index.

RETURN VALUES

Returns the offset to the next occurrence or -1 if no occurrence is found.

SEE ALSO

cat, catbuf, catbuf_match