summaryrefslogtreecommitdiff
path: root/src/til_str.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-06-11 17:00:43 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-06-12 16:16:12 -0700
commit3398e156c561981ce30f4847ac56458c875f8316 (patch)
treef45b8a8aae6b332f2e3dee45ee3f6015cbd1fc26 /src/til_str.h
parent7f7272b5b87d3baf8051a6856507b4b2618765c9 (diff)
til_str: add preliminary growable string type
Preparation for eliminating open_memstream() usage...
Diffstat (limited to 'src/til_str.h')
-rw-r--r--src/til_str.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/til_str.h b/src/til_str.h
new file mode 100644
index 0000000..e653884
--- /dev/null
+++ b/src/til_str.h
@@ -0,0 +1,14 @@
+#ifndef _TIL_STR_H
+#define _TIL_STR_H
+
+typedef struct til_str_t til_str_t;
+
+til_str_t * til_str_new(const char *seed);
+void * til_str_free(til_str_t *str);
+til_str_t * til_str_newf(const char *format, ...);
+int til_str_appendf(til_str_t *str, const char *format, ...);
+char * til_str_strdup(const til_str_t *str);
+const char * til_str_buf(const til_str_t *str, size_t *res_len);
+char * til_str_to_buf(til_str_t *str, size_t *res_len);
+
+#endif
© All Rights Reserved