comparison th_string.h @ 674:dfabc7eef3dd

Add new functions th_split_string() and th_join_string().
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 25 Feb 2020 05:16:42 +0200
parents 284d5b789b7c
children 83a48de05fe9
comparison
equal deleted inserted replaced
673:1763d9b26a58 674:dfabc7eef3dd
140 TH_ATTR_PRINTF_FMT(2, 3); 140 TH_ATTR_PRINTF_FMT(2, 3);
141 141
142 int th_pstr_cpy(th_char_t **pdst, const th_char_t *src); 142 int th_pstr_cpy(th_char_t **pdst, const th_char_t *src);
143 int th_pstr_cat(th_char_t **pdst, const th_char_t *src); 143 int th_pstr_cat(th_char_t **pdst, const th_char_t *src);
144 144
145 int th_split_string(const char *str, char ***elems, size_t *nelems, const char *sep);
146 int th_join_string(char **str, char **elems, const size_t nelems, const char *sep);
147
145 148
146 /* Internal printf() implementation. NOTICE! This API may be unstable. 149 /* Internal printf() implementation. NOTICE! This API may be unstable.
147 */ 150 */
148 int th_vprintf_do(th_vprintf_ctx *ctx, th_vprintf_putch vputch, 151 int th_vprintf_do(th_vprintf_ctx *ctx, th_vprintf_putch vputch,
149 const th_char_t *fmt, va_list ap); 152 const th_char_t *fmt, va_list ap);