2020-11-09 05:23:58 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
2019-03-14 13:14:33 +01:00
|
|
|
|
|
|
|
#include "nulstr-util.h"
|
|
|
|
#include "string-util.h"
|
|
|
|
|
|
|
|
bool nulstr_contains(const char *nulstr, const char *needle) {
|
|
|
|
const char *i;
|
|
|
|
|
|
|
|
if (!nulstr)
|
|
|
|
return false;
|
|
|
|
|
|
|
|
NULSTR_FOREACH(i, nulstr)
|
|
|
|
if (streq(i, needle))
|
|
|
|
return true;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|