c-icap-doc  0.1
Typedefs | Functions
Vectors of strings

Typedefs

typedef ci_vector_t ci_str_vector_t
 The ci_str_vector is used to implement string vectors. More...
 

Functions

void ci_str_vector_iterate (const ci_str_vector_t *vector, void *data, int(*fn)(void *data, const char *))
 Run the given function for each string vector item. More...
 
const char * ci_str_vector_search (ci_str_vector_t *vector, const char *str)
 Search for a string in a string vector. More...
 

Detailed Description

Typedef Documentation

The ci_str_vector is used to implement string vectors.

The ci_str_vector_create, ci_str_vector_destroy, ci_str_vector_add, and ci_str_vector_pop defines are similar and equivalent to the ci_vector_* functions.

Function Documentation

void ci_str_vector_iterate ( const ci_str_vector_t vector,
void *  data,
int(*)(void *data, const char *)  fn 
)

Run the given function for each string vector item.

Parameters
vectora pointer to the ci_vector_t object
dataa pointer to data which will be passed to the fn function
fna pointer to the function which will be run for each string vector item. The iteration will stop if the fn function return non zero value.
const char* ci_str_vector_search ( ci_str_vector_t vector,
const char *  str 
)

Search for a string in a string vector.

Parameters
vectora pointer to the ci_vector_t object
strthe string to search for
Returns
a pointer to the new item on success, NULL otherwise