GCC Code Coverage Report


Directory: ./
File: lib/my/my_strlowcase.c
Date: 2024-06-05 00:34:38
Exec Total Coverage
Lines: 5 5 100.0%
Functions: 1 1 100.0%
Branches: 6 6 100.0%

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_strlowcase
4 ** File description:
5 ** Replaces upcase by lowcase of a string (str) and returns them
6 */
7 /**
8 * @file my_strlowcase.c
9 * @brief The file containing the my_strlowcase function
10 * @author Nicolas TORO
11 */
12
13 #include "my.h"
14
15 2 char *my_strlowcase(char *str)
16 {
17
2/2
✓ Branch 0 taken 11 times.
✓ Branch 1 taken 2 times.
13 for (int i = 0; str[i] != '\0'; i++) {
18
4/4
✓ Branch 0 taken 10 times.
✓ Branch 1 taken 1 times.
✓ Branch 2 taken 1 times.
✓ Branch 3 taken 9 times.
11 if (str[i] >= 65 && str[i] <= 90) {
19 1 str[i] = str[i] + 32;
20 }
21 }
22 2 return str;
23 }
24