Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2023 | ||
3 | ** my_putstr | ||
4 | ** File description: | ||
5 | ** Writes a string (str) in stdout | ||
6 | ** and returns the length of the printed string | ||
7 | */ | ||
8 | /** | ||
9 | * @file my_putstr.c | ||
10 | * @brief The file containing the my_putstr function | ||
11 | * @author Nicolas TORO | ||
12 | */ | ||
13 | |||
14 | #include "my.h" | ||
15 | |||
16 | 198 | int my_putstr(char const *str) | |
17 | { | ||
18 | int len; | ||
19 | |||
20 |
2/2✓ Branch 0 taken 1 times.
✓ Branch 1 taken 197 times.
|
198 | if (str == NULL) |
21 | 1 | return 0; | |
22 | 197 | len = my_strlen(str); | |
23 | 197 | write(1, str, len); | |
24 | 197 | return len; | |
25 | } | ||
26 |