-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_xtoa.c
26 lines (23 loc) · 1.08 KB
/
ft_xtoa.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_xtoa.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lenzo-pe <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/03/13 18:08:31 by lenzo-pe #+# #+# */
/* Updated: 2021/05/07 17:26:08 by lenzo-pe ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_conv.h"
char *ft_xtoa(unsigned int n)
{
size_t len;
char *str;
len = ft_xnbrlen(n) + 1;
str = (char *)malloc(sizeof(char) * len);
if (!str)
return (NULL);
ft_xnbrcpy(str, n);
return (str);
}