GCC Code Coverage Report


Directory: ./
File: lib/my/my_strcpy.c
Date: 2024-06-05 02:24:39
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 2 char *my_strcpy(char *dest, char const *src)
16 {
17 2 int i = 0;
18
19
2/2
✓ Branch 0 taken 10 times.
✓ Branch 1 taken 2 times.
12 while (src[i] != '\0') {
20 10 dest[i] = src[i];
21 10 i = i + 1;
22 }
23 2 dest[i] = '\0';
24 2 return dest;
25 }
26