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.
libft/ft_putstr_fd.c

28 lines
1.0 KiB
C
Raw Permalink Normal View History

2023-11-03 16:21:15 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/31 11:45:55 by adjoly #+# #+# */
2023-11-05 15:12:25 +01:00
/* Updated: 2023/11/05 15:06:13 by adjoly ### ########.fr */
2023-11-03 16:21:15 +01:00
/* */
/* ************************************************************************** */
#include "libft.h"
void ft_putstr_fd(char *s, int fd)
{
int i;
i = 0;
2023-11-05 15:12:25 +01:00
if (s == NULL)
return ;
2023-11-03 16:21:15 +01:00
while (s[i])
{
write(fd, &s[i], 1);
i++;
}
}