GCC Code Coverage Report


Directory: ./
File: lib/my/my_str_is.c
Date: 2024-05-07 14:54:03
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 1 1 100.0%
Branches: 4 4 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2024
3 ** my_str_is
4 ** File description:
5 ** Returns 1 if the string (str) is composed of characters
6 ** in the characters list (char_list) or 0 if not
7 */
8 /**
9 * @file my_str_is.c
10 * @brief The file containing the my_str_is function
11 * @author Nicolas TORO
12 */
13
14 #include "my.h"
15
16 216 int my_str_is(char *str, const char *char_list)
17 {
18
2/2
✓ Branch 0 taken 342 times.
✓ Branch 1 taken 2 times.
344 for (int i = 0; str[i]; i++)
19
2/2
✓ Branch 1 taken 214 times.
✓ Branch 2 taken 128 times.
342 if (!my_char_is(str[i], char_list))
20 214 return 0;
21 2 return 1;
22 }
23