Archived
1
0
This repository has been archived on 2024-10-25. You can view files and clone it, but cannot push or open issues or pull requests.
so_long/printf/ft_putstr.c

32 lines
1.1 KiB
C
Raw Permalink Normal View History

2024-01-13 19:13:17 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/31 11:45:55 by adjoly #+# #+# */
/* Updated: 2023/12/06 15:51:38 by adjoly ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int ft_putstr(char *s)
{
int i;
i = 0;
if (s == NULL)
{
write(1, "(null)", 6);
return (6);
}
while (s[i])
{
write(1, &s[i], 1);
i++;
}
return (i);
}