diff options
Diffstat (limited to 'strv.c')
-rw-r--r-- | strv.c | 4 |
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); |