#include <kcs/ext.h>Use vector_of_() macro to declare it.
No public members.
vector_of_(type, var);- Declaration of the variable of
varas vector with the type oftype.
void vector_free(obj);- Frees a vector object.
- Do not access to the freed object.
int vector_size(obj);- Returns the element count of
obj.
void vector_resize(obj, size);- Resizes
objto appendsizeelements more.
void vector_push(obj, value);- Appends
valueto the tail ofobj.
void vector_unshift(obj, value);- Appends
valueto the head ofobj.
void vector_pop(obj);- Removes the last element of
obj.
void vector_head(obj);- Accesses the head element of
obj.
void vector_last(obj);- Accesses the last element of
obj.
void vector_shrinkto(obj, size);- Shrinks
objdown tosize.
void vector_shrinkby(obj, size);- Shrinks
objdown bysize.
void vector_remove(obj, index, count);- Removes elements from
objwithcountfromindex.