-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putnstr_fd.c
26 lines (23 loc) · 1.04 KB
/
ft_putnstr_fd.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnstr_fd.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: hugsbord <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/12/13 11:55:05 by hugsbord #+# #+# */
/* Updated: 2019/12/13 12:24:56 by hugsbord ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_putnstr_fd(char const *s, size_t len, int fd)
{
size_t i;
i = 0;
while (s[i] && i < len)
{
ft_putchar_fd(s[i], fd);
i++;
}
return (i);
}