-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_putstr.c
34 lines (30 loc) · 1.16 KB
/
ft_putstr.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pveiga-c <pveiga-c@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/04/24 19:08:47 by pveiga-c #+# #+# */
/* Updated: 2023/04/28 16:20:57 by pveiga-c ### ########.fr */
/* */
/* ************************************************************************** */
/*
Imprime uma string (conforme definido pela convenção C comum).
*/
#include "ft_printf.h"
void ft_putstr(char *str, int *len_final)
{
int i;
i = 0;
if (!str)
{
ft_putstr("(null)", len_final);
return ;
}
while (str[i] != '\0')
{
ft_putchar(str[i], len_final);
i++;
}
}