]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
d8b4d14d LP |
2 | #pragma once |
3 | ||
4 | #include <stdbool.h> | |
5 | #include <string.h> | |
6 | ||
7 | #define NULSTR_FOREACH(i, l) \ | |
8 | for ((i) = (l); (i) && *(i); (i) = strchr((i), 0)+1) | |
9 | ||
10 | #define NULSTR_FOREACH_PAIR(i, j, l) \ | |
11 | for ((i) = (l), (j) = strchr((i), 0)+1; (i) && *(i); (i) = strchr((j), 0)+1, (j) = *(i) ? strchr((i), 0)+1 : (i)) | |
12 | ||
13 | bool nulstr_contains(const char *nulstr, const char *needle); |