1.1 --- a/ucx/string.h Tue Oct 02 11:18:47 2012 +0200 1.2 +++ b/ucx/string.h Tue Oct 02 13:43:17 2012 +0200 1.3 @@ -68,6 +68,23 @@ 1.4 */ 1.5 sstr_t sstrsubsl (sstr_t s, size_t start, size_t end); 1.6 1.7 +/* 1.8 + * splits s into n parts 1.9 + * 1.10 + * s the string to split 1.11 + * d the delimiter string 1.12 + * n the maximum size of the resulting list 1.13 + * a size of 0 indicates an unbounded list size 1.14 + * the actual size of the list will be stored here 1.15 + * 1.16 + * Hint: use this value to avoid dynamic reallocation of the result list 1.17 + * 1.18 + * Returns a list of the split strings 1.19 + * NOTE: this list needs to be freed manually after usage 1.20 + * 1.21 + * Returns NULL on error 1.22 + */ 1.23 +sstr_t* sstrsplit(sstr_t s, sstr_t d, size_t *n); 1.24 1.25 int sstrcmp(sstr_t s1, sstr_t s2); 1.26