ft_putstr_fd - chanhl22/libft GitHub Wiki
1 /* ************************************************************************** */
2 /* */
3 /* ::: :::::::: */
4 /* ft_putstr_fd.c :+: :+: :+: */
5 /* +:+ +:+ +:+ */
6 /* By: chanhlee <[email protected].> +#+ +:+ +#+ */
7 /* +#+#+#+#+#+ +#+ */
8 /* Created: 2021/01/26 11:54:03 by chanhlee #+# #+# */
9 /* Updated: 2021/02/02 12:54:54 by chanhlee ### ########.fr */
10 /* */
11 /* ************************************************************************** */
12
13 #include "libft.h"
14
15 void ft_putstr_fd(char *s, int fd)
16 {
17 int i;
18
19 i = 0;
20 if (!s)
21 return ;
22 while (s[i] != '\0')
23 {
24 ft_putchar_fd(s[i], fd); //반복문으로 putchar을 여러번 호출해서 출력
25 i++;
26 }
27 }