From 44b67786e23d4254b918f4ebaae5459f463979e6 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 15 May 2023 16:45:21 +0200 Subject: Add strvec_at, strvec_empty, strvec_front, strvec_back --- src/strvec.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/strvec.c b/src/strvec.c index 13699a3..f6432b9 100644 --- a/src/strvec.c +++ b/src/strvec.c @@ -166,6 +166,14 @@ strvec_stra(struct strvec *strvec) return strvec->vec.data; } +const char ** +strvec_at(struct strvec *strvec, size_t index) +{ + LIBSTRVEC_ABORT_ON_ARGS(!strvec); + + return dvec_at(&strvec->vec, index); +} + size_t strvec_len(struct strvec *strvec) { -- cgit v1.2.3-71-gd317