Welcome to little lamb

Code » limb » master » tree

[master] / src / doc / siovec.h / siov_memcmp.3.md

% limb manual
% siov_memcmp(3)
% limb 0.1.0
% 2023-07-24

# NAME

siov_memcmp - compare a byte array with an array of vectors

# SYNOPSIS

    #include <limb/siovec.h>

```pre hl
int siov_memcmp(const struct iovec *<em>v</em>, unsigned int <em>n</em>, const char *<em>s</em>, size_t <em>len</em>)
```

# DESCRIPTION

The `siov_memcmp`() function compares the first `len` bytes of `s` and those
scattered across given array `v` of `n` vectors (each interpreted as `unsigned
char`).

# RETURN VALUE

The `siov_memcmp`() function returns an integer less than, equal to, or greater
than zero if the first `len` bytes of scattered data are found, respectively, to
be less than, to match, or be greater than the first `len` bytes of `s`.

# SEE ALSO

[memcmp](3)