26 lines
1 KiB
C
26 lines
1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_putstr_fd.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: grobledo <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/02/20 23:29:21 by grobledo #+# #+# */
|
|
/* Updated: 2023/02/20 23:29:26 by grobledo ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
#include "libft.h"
|
|
|
|
void ft_putstr_fd(char *s, int fd)
|
|
{
|
|
int i;
|
|
|
|
if (!s)
|
|
return ;
|
|
i = 0;
|
|
while (s[i])
|
|
{
|
|
write(fd, &s[i], 1);
|
|
i++;
|
|
}
|
|
}
|