util: split out nulstr related stuff to nulstr-util.[ch]

This commit is contained in:
Lennart Poettering
2019-03-14 13:25:52 +01:00
parent 090a9c1eba
commit d8b4d14df4
40 changed files with 70 additions and 40 deletions
-13
View File
@@ -676,19 +676,6 @@ char *cellescape(char *buf, size_t len, const char *s) {
return buf;
}
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;
}
char* strshorten(char *s, size_t l) {
assert(s);