diff -r 35f67a8ef875 -r bf8ab7bb74ff ucx/string.h --- a/ucx/string.h Tue Oct 02 11:18:47 2012 +0200 +++ b/ucx/string.h Tue Oct 02 13:43:17 2012 +0200 @@ -68,6 +68,23 @@ */ sstr_t sstrsubsl (sstr_t s, size_t start, size_t end); +/* + * splits s into n parts + * + * s the string to split + * d the delimiter string + * n the maximum size of the resulting list + * a size of 0 indicates an unbounded list size + * the actual size of the list will be stored here + * + * Hint: use this value to avoid dynamic reallocation of the result list + * + * Returns a list of the split strings + * NOTE: this list needs to be freed manually after usage + * + * Returns NULL on error + */ +sstr_t* sstrsplit(sstr_t s, sstr_t d, size_t *n); int sstrcmp(sstr_t s1, sstr_t s2);