summaryrefslogtreecommitdiffstats
path: root/dstring.c
diff options
context:
space:
mode:
Diffstat (limited to 'dstring.c')
-rw-r--r--dstring.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/dstring.c b/dstring.c
index 5a6d4b3..54815d6 100644
--- a/dstring.c
+++ b/dstring.c
@@ -95,6 +95,10 @@ int dstrncat(char **dest, const char *src, size_t n) {
return dstrcat_impl(dest, src, strnlen(src, n));
}
+int dstrapp(char **str, char c) {
+ return dstrcat_impl(str, &c, 1);
+}
+
void dstrfree(char *dstr) {
if (dstr) {
free(dstrheader(dstr));