minishell
ft_memset.c File Reference
#include <string.h>
#include "ft_mem.h"
Include dependency graph for ft_memset.c:

Go to the source code of this file.

Functions

void * ft_memset (void *target, int val_to_set, size_t len_to_fill)
 

Function Documentation

◆ ft_memset()

void* ft_memset ( void *  target,
int  val_to_set,
size_t  len_to_fill 
)

Definition at line 16 of file ft_memset.c.

17 {
18  unsigned char *p_c_target;
19 
20  p_c_target = target;
21  while (len_to_fill-- > 0)
22  {
23  *p_c_target = (unsigned char)val_to_set;
24  p_c_target++;
25  }
26  return (target);
27 }