27 lines
1.0 KiB
C
27 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_memset.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: adjoly <adjoly@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/10/31 17:40:22 by adjoly #+# #+# */
|
|
/* Updated: 2023/11/03 12:11:08 by adjoly ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
void *ft_memset(void *s, int c, size_t n)
|
|
{
|
|
size_t i;
|
|
|
|
i = 0;
|
|
while (i < n)
|
|
{
|
|
((char *)(s))[i] = c;
|
|
i++;
|
|
}
|
|
return (s);
|
|
}
|