GCC Code Coverage Report


Directory: ./
File: lib/my/my_str_is.c
Date: 2024-06-05 00:34:38
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 2 int my_str_is(char *str, const char *char_list)
17 {
18
2/2
✓ Branch 0 taken 7 times.
✓ Branch 1 taken 1 times.
8 for (int i = 0; str[i]; i++)
19
2/2
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 6 times.
7 if (!my_char_is(str[i], char_list))
20 1 return 0;
21 1 return 1;
22 }
23