siov_search(3)
limb manual
siov_search(3)
NAME
siov_search - search for a byte array in an array of vectors
SYNOPSIS
#include <limb/siovec.h>
size_t siov_search(const struct iovec *v, unsigned int n, char *s, size_t len)
DESCRIPTION
The siov_search
() function scans data pointed by the array v
of n
vectors
for the first instance matching data pointed by s
of len
bytes.
As such, it may contain any byte, including NUL bytes, and does not need to be NUL-terminated. The occurrence will be found even if scattered across multiple memory regions/vectors.
RETURN VALUE
The siov_search
() function returns the position of the first occurrence found
in the data within the array v
of n
vectors, or the total length of said
data otherwise.