29 lines
1.0 KiB
C
29 lines
1.0 KiB
C
|
/* ************************************************************************** */
|
||
|
/* */
|
||
|
/* ::: :::::::: */
|
||
|
/* ft_memset.c :+: :+: :+: */
|
||
|
/* +:+ +:+ +:+ */
|
||
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
||
|
/* +#+#+#+#+#+ +#+ */
|
||
|
/* Created: 2022/09/27 09:29:51 by cchauvet #+# #+# */
|
||
|
/* Updated: 2022/09/27 09:48:23 by cchauvet ### ########.fr */
|
||
|
/* */
|
||
|
/* ************************************************************************** */
|
||
|
|
||
|
#include "libft.h"
|
||
|
|
||
|
void *ft_memset(void *s, int c, size_t n)
|
||
|
{
|
||
|
char *tab;
|
||
|
size_t i;
|
||
|
|
||
|
tab = s;
|
||
|
i = 0;
|
||
|
while (i < n)
|
||
|
{
|
||
|
tab[i] = c;
|
||
|
i++;
|
||
|
}
|
||
|
return (s);
|
||
|
}
|