summary refs log tree commit diff
path: root/strv.c
diff options
context:
space:
mode:
authorwrmr2024-11-08 23:25:03 -0500
committerwrmr2024-11-08 23:25:03 -0500
commit012ed5bd6455ce291741ad540a5e356e4810133b (patch)
tree32bfb5425b1f1a899c497ce817b44111dcd0ff54 /strv.c
parent6050dcdd3669b7102f35a226a6a3ee485c7b703a (diff)
use strv_t for doc_add_text, remove doc_add_textn, add strv()
Diffstat (limited to 'strv.c')
-rw-r--r--strv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/strv.c b/strv.c
index 5da11f5..a3e9f6a 100644
--- a/strv.c
+++ b/strv.c
@@ -2,6 +2,10 @@
 
 #include "strv.h"
 
+strv_t strv(const char *s) {
+	return (strv_t) { s, strlen(s) };
+}
+
 strv_t strv_head(strv_t ss, int chr, size_t *i) {
 	size_t j = i ? *i : 0;
 	char *c = memchr(&ss.s[j], chr, ss.n - j);