Line | Count | Source (jump to first uncovered line) |
1 | /* SPDX-License-Identifier: LGPL-2.1+ */ | |
2 | ||
3 | #include "nulstr-util.h" | |
4 | #include "string-util.h" | |
5 | ||
6 | 915k | bool nulstr_contains(const char *nulstr, const char *needle) { |
7 | 915k | const char *i; |
8 | 915k | |
9 | 915k | if (!nulstr) |
10 | 0 | return false; |
11 | 915k | |
12 | 915k | NULSTR_FOREACH(i, nulstr) |
13 | 3.21M | if (streq(i, needle)) |
14 | 3.21M | return true; |
15 | 915k | |
16 | 915k | return false; |
17 | 915k | } |