-
Notifications
You must be signed in to change notification settings - Fork 0
/
convert_u.c
27 lines (24 loc) · 1.11 KB
/
convert_u.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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* convert_u.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jmykkane <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/30 14:42:32 by jmykkane #+# #+# */
/* Updated: 2022/11/30 14:42:33 by jmykkane ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
int convert_u(va_list *args, int count)
{
char *str;
long num;
int len;
num = (unsigned int)va_arg(*args, int);
str = ft_itoa(num);
ft_putstr_fd(str, 1);
len = ft_strlen(str);
free(str);
return (count + len);
}