axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
char** axl_stream_split ( const char *  chunk,
int  separator_num,

Allows to split the provided chunk, into several pieces that are separated by the separator (or separators) provided.

The function will try to split the chunk provide using the separator provided, and optionally, all separators provided.

Here is an example:

1 char ** result;
3 // split the provided value using the ':', ';' and ',' as separators.
4 result = axl_stream_split (value, 3, ":", ";", ",");

The value returned must be deallocated using axl_stream_freev.

chunkThe chunk to split.
separator_numThe number os separators to be used while spliting the chunk.
A newly allocated string, that must be deallocated by using axl_stream_freev. The function will return a NULL if the chunk or the separators provided are NULL.

NOTE: See also axl_split.

References axl_free(), axl_memcmp(), axl_new, and axl_return_val_if_fail.

Referenced by axl_doc_get_list().