vt_in_bound 3 2016-02-28 genvector manual

NAME

vt_in_bound - determine whether an index is on the vector

SYNPOSIS

int vt_in_bound(vt_t *vect, vt_size_t idx)

DESCRIPTION

vt_in_bound returns whether idx is within the bounds of the vector - which means an element exists for that index in the vector. vt_in_bound is just a thin wrapper around vt_len.

Note: vt_t and the vt_ prefix are type-dependant, see vt_t(7).

Arguments:
vect A vector already initialized using vt_init.
idx Index of the element to check.

RETURN VALUE

Returns 1 if idx exists or 0 if idx is out of bounds.

SEE ALSO

vt_in_bound 3 2016-02-28 genvector manual