42_libft/ft_putstr_fd.c

22 lines
1011 B
C
Raw Normal View History

2022-09-27 11:25:41 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
2022-10-04 08:21:55 -04:00
/* ft_putstr_fd.c :+: :+: :+: */
2022-09-27 11:25:41 -04:00
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
2022-10-04 08:21:55 -04:00
/* Created: 2022/09/29 22:25:08 by cchauvet #+# #+# */
/* Updated: 2022/09/29 22:40:34 by cchauvet ### ########.fr */
2022-09-27 11:25:41 -04:00
/* */
/* ************************************************************************** */
#include "libft.h"
2022-10-04 08:21:55 -04:00
void ft_putstr_fd(char *s, int fd)
2022-09-27 11:25:41 -04:00
{
2022-10-04 08:21:55 -04:00
if (s == NULL)
return ;
while (*s)
write(fd, s++, 1);
2022-09-27 11:25:41 -04:00
}