24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_ctoa.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/07/31 18:41:31 by cchauvet #+# #+# */
|
||
|
/* Updated: 2022/07/31 22:42:20 by cchauvet ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "rush02.h"
|
||
|
|
||
|
char *ctoa(char c, unsigned int size)
|
||
|
{
|
||
|
char *str;
|
||
|
|
||
|
str = malloc(sizeof(char) * size);
|
||
|
str[0] = c;
|
||
|
str[1] = '\0';
|
||
|
return (str);
|
||
|
}
|