diff options
| author | Louis Burda <quent.burda@gmail.com> | 2023-05-15 16:45:21 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2023-05-15 16:45:21 +0200 |
| commit | 44b67786e23d4254b918f4ebaae5459f463979e6 (patch) | |
| tree | 19291148480433fccce746da76752456b474ec63 /src | |
| parent | 54bf1a9db4b5777725dc52096be48d3879aeec82 (diff) | |
| download | libstrvec-c-44b67786e23d4254b918f4ebaae5459f463979e6.tar.gz libstrvec-c-44b67786e23d4254b918f4ebaae5459f463979e6.zip | |
Add strvec_at, strvec_empty, strvec_front, strvec_back
Diffstat (limited to 'src')
| -rw-r--r-- | src/strvec.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |
