ucx/string.h

changeset 39
bf8ab7bb74ff
parent 38
35f67a8ef875
child 42
ff3dd1ee7dee
equal deleted inserted replaced
38:35f67a8ef875 39:bf8ab7bb74ff
66 /* 66 /*
67 * 67 *
68 */ 68 */
69 sstr_t sstrsubsl (sstr_t s, size_t start, size_t end); 69 sstr_t sstrsubsl (sstr_t s, size_t start, size_t end);
70 70
71 /*
72 * splits s into n parts
73 *
74 * s the string to split
75 * d the delimiter string
76 * n the maximum size of the resulting list
77 * a size of 0 indicates an unbounded list size
78 * the actual size of the list will be stored here
79 *
80 * Hint: use this value to avoid dynamic reallocation of the result list
81 *
82 * Returns a list of the split strings
83 * NOTE: this list needs to be freed manually after usage
84 *
85 * Returns NULL on error
86 */
87 sstr_t* sstrsplit(sstr_t s, sstr_t d, size_t *n);
71 88
72 int sstrcmp(sstr_t s1, sstr_t s2); 89 int sstrcmp(sstr_t s1, sstr_t s2);
73 90
74 sstr_t sstrdup(sstr_t s); 91 sstr_t sstrdup(sstr_t s);
75 92

mercurial