-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_putnbr.c
executable file
·27 lines (24 loc) · 1.07 KB
/
ft_putnbr.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
27
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_putnbr.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tseguier <tseguier@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2013/11/25 16:52:59 by tseguier #+# #+# */
/* Updated: 2014/07/02 15:31:14 by tseguier ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_putnbr(int n)
{
char *nbstr;
int size;
nbstr = ft_itoa(n);
if (!nbstr)
return (0);
ft_putstr(nbstr);
size = ft_strlen(nbstr);
ft_strdel(&nbstr);
return (size);
}