diff options
Diffstat (limited to '')
-rw-r--r-- | libft/src/ft_putnchar.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libft/src/ft_putnchar.c b/libft/src/ft_putnchar.c new file mode 100644 index 0000000..45fb7b2 --- /dev/null +++ b/libft/src/ft_putnchar.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* LE - / */ +/* / */ +/* ft_putnchar.c .:: .:/ . .:: */ +/* +:+:+ +: +: +:+:+ */ +/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */ +/* #+# #+ #+ #+# */ +/* Created: 2019/12/22 16:52:25 by rbousset #+# ## ## #+# */ +/* Updated: 2019/12/22 16:52:26 by rbousset ### #+. /#+ ###.fr */ +/* / */ +/* / */ +/* ************************************************************************** */ + +#include <libft.h> +#include <stddef.h> + +int + ft_putnchar(int c, const size_t n) +{ + size_t i; + + i = 0; + while (i < n) + { + ft_putchar(c); + i++; + } + return (i); +} |