LCOV - code coverage report
Current view: top level - lib/libc/minimal/source/string - strspn.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 8 0.0 %
Date: 2022-08-18 11:36:24 Functions: 0 0 -
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 8 0.0 %

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright (c) 2019 Peter Bigot Consulting, LLC
       3                 :            :  *
       4                 :            :  * SPDX-License-Identifier: Apache-2.0
       5                 :            :  */
       6                 :            : 
       7                 :            : #include <string.h>
       8                 :            : #include <string.h>
       9                 :            : 
      10                 :            : size_t strspn(const char *s,
      11                 :            :               const char *accept)
      12                 :            : {
      13                 :          0 :         const char *ins = s;
      14                 :            : 
      15   [ #  #  #  # ]:          0 :         while ((*s != '\0') && (strchr(accept, *s) != NULL)) {
      16                 :          0 :                 ++s;
      17                 :            :         }
      18                 :            : 
      19                 :          0 :         return s - ins;
      20                 :            : }
      21                 :            : 
      22                 :            : size_t strcspn(const char *s,
      23                 :            :                const char *reject)
      24                 :            : {
      25                 :          0 :         const char *ins = s;
      26                 :            : 
      27   [ #  #  #  # ]:          0 :         while ((*s != '\0') && (strchr(reject, *s) == NULL)) {
      28                 :          0 :                 ++s;
      29                 :            :         }
      30                 :            : 
      31                 :          0 :         return s - ins;
      32                 :            : }

Generated by: LCOV version 1.14