libft
Loading...
Searching...
No Matches
ft_memset.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_memset.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: tspoof <tspoof@student.hive.fi> +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2022/10/25 18:09:01 by tspoof #+# #+# */
9/* Updated: 2023/06/05 14:14:40 by tspoof ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13void *ft_memset(void *b, int c, int len)
14{
15 int i;
16
17 i = 0;
18 while (i < len)
19 {
20 ((unsigned char *)b)[i] = (unsigned char) c;
21 i++;
22 }
23 return (b);
24}
void * ft_memset(void *b, int c, int len)
Fill memory area with a contant byte.
Definition ft_memset.c:13