Debian Codegraph @

src/fundamental/strv.h

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3
4 #include "macro.h"
5 #include "string-util.h"
6
7 #define _STRV_FOREACH(s, l, i) \
8 for (typeof(*(l)) *s, *i = (l); (s = i) && *i; i++)
9
10 #define STRV_FOREACH(s, l) \
11 _STRV_FOREACH(s, l, UNIQ_T(i, UNIQ))
12
13 static inline bool strv_isempty(sd_char * const *l) {
14 return !l || !*l;
15 }