C Collections

cvector · Section 3

cvector_append_cvector

cvector_append_cvector - append a vector to a vector

C Collections (libccollections, -lccollections)

#include <ccollections/cvector.h>
 
bool cvector_append_cvector(cvec v_to, cvec v_from);

Appends every element of one vector to another. Both vectors must have the
same element size.

v_to    Destination vector
v_from  Source vector

true on success.
false when the combined element count overflows or is more than
ccol_max_elem_count, or when the memory allocation fails.

The two element sizes must match; the function asserts when they don't,
and also when v_to or v_from is NULL.
 
Either all the elements are appended or none are, and more capacity is
reserved automatically when needed.

cvec_append_cvec(3), cvector_append_array(3)