LCOV - code coverage report
Current view: top level - basic - nulstr-util.c (source / functions) Hit Total Coverage
Test: main_coverage.info Lines: 5 7 71.4 %
Date: 2019-08-22 15:41:25 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /* SPDX-License-Identifier: LGPL-2.1+ */
       2             : 
       3             : #include "nulstr-util.h"
       4             : #include "string-util.h"
       5             : 
       6         171 : bool nulstr_contains(const char *nulstr, const char *needle) {
       7             :         const char *i;
       8             : 
       9         171 :         if (!nulstr)
      10           0 :                 return false;
      11             : 
      12         246 :         NULSTR_FOREACH(i, nulstr)
      13         246 :                 if (streq(i, needle))
      14         171 :                         return true;
      15             : 
      16           0 :         return false;
      17             : }

Generated by: LCOV version 1.14