GCC Code Coverage Report


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

Line Branch Exec Source
1 /*
2 ** EPITECH PROJECT, 2023
3 ** my_strcpy
4 ** File description:
5 ** Copy a string (src) and paste it on another string (dest)
6 */
7 /**
8 * @file my_strcpy.c
9 * @brief The file containing the my_strcpy function
10 * @author Nicolas TORO
11 */
12
13 #include "my.h"
14
15 4 char *my_strcpy(char *dest, char const *src)
16 {
17 4 int i = 0;
18
19
2/2
✓ Branch 0 taken 19 times.
✓ Branch 1 taken 4 times.
23 while (src[i] != '\0') {
20 19 dest[i] = src[i];
21 19 i = i + 1;
22 }
23 4 dest[i] = '\0';
24 4 return dest;
25 }
26