64 sstr_t sstrsubs (sstr_t s, size_t start); |
68 sstr_t sstrsubs (sstr_t s, size_t start); |
65 |
69 |
66 /* |
70 /* |
67 * |
71 * |
68 */ |
72 */ |
69 sstr_t sstrsubsl (sstr_t s, size_t start, size_t end); |
73 sstr_t sstrsubsl (sstr_t s, size_t start, size_t length); |
70 |
74 |
|
75 /* |
|
76 * splits s into n parts |
|
77 * |
|
78 * s the string to split |
|
79 * d the delimiter string |
|
80 * n the maximum size of the resulting list |
|
81 * a size of 0 indicates an unbounded list size |
|
82 * the actual size of the list will be stored here |
|
83 * |
|
84 * Hint: use this value to avoid dynamic reallocation of the result list |
|
85 * |
|
86 * Returns a list of the split strings |
|
87 * NOTE: this list needs to be freed manually after usage |
|
88 * |
|
89 * Returns NULL on error |
|
90 */ |
|
91 sstr_t* sstrsplit(sstr_t s, sstr_t d, size_t *n); |
71 |
92 |
72 int sstrcmp(sstr_t s1, sstr_t s2); |
93 int sstrcmp(sstr_t s1, sstr_t s2); |
73 |
94 |
74 sstr_t sstrdub(sstr_t s); |
|
75 sstr_t sstrdup(sstr_t s); |
95 sstr_t sstrdup(sstr_t s); |
76 |
96 |
|
97 // webserver extension |
77 sstr_t sstrtrim(sstr_t string); |
98 sstr_t sstrtrim(sstr_t string); |
78 sstr_t sstrdup_mp(UcxMempool *mp, sstr_t s); |
99 sstr_t sstrdup_mp(UcxMempool *pool, sstr_t s); |
|
100 sstr_t sstrdup_pool(pool_handle_t *pool, sstr_t s); |
79 |
101 |
80 #ifdef __cplusplus |
102 #ifdef __cplusplus |
81 } |
103 } |
82 #endif |
104 #endif |
83 |
105 |