summary refs log tree commit diff
path: root/strv.h
diff options
context:
space:
mode:
authorwrmr2024-11-08 17:05:41 -0500
committerwrmr2024-11-08 17:05:41 -0500
commit25cde1651b86455707051a842ed66a6df59a006b (patch)
treee1241f3f813ba9c0fff7ad099f8fe1d986081b00 /strv.h
parentb977942932bf1cd625f8d7a6f310b0d3a537f72e (diff)
rename struct str_slice -> strv_t (string view), use memchr
Diffstat (limited to 'strv.h')
-rw-r--r--strv.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/strv.h b/strv.h
new file mode 100644
index 0000000..553a39c
--- /dev/null
+++ b/strv.h
@@ -0,0 +1,13 @@
+#ifndef STRV_H
+#define STRV_H
+
+#include <stddef.h>
+
+typedef struct {
+	const char *s;
+	size_t n;
+} strv_t;
+
+strv_t strv_head(strv_t ss, int chr, size_t *i);
+
+#endif