maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_bzero.c
Go to the documentation of this file.
1/* ************************************************************************** */
2/* */
3/* ::: :::::::: */
4/* ft_bzero.c :+: :+: :+: */
5/* +:+ +:+ +:+ */
6/* By: rmikhayl <rmikhayl@student.42london.c +#+ +:+ +#+ */
7/* +#+#+#+#+#+ +#+ */
8/* Created: 2023/12/17 17:25:28 by rmikhayl #+# #+# */
9/* Updated: 2023/12/17 17:25:28 by rmikhayl ### ########.fr */
10/* */
11/* ************************************************************************** */
12
13#include "libft.h"
14
15/* *************************** ft_bzero ************************************* */
16/* Sets the first 'n' bytes of memory starting at 's' to zero (i.e., '\0'). */
17/* */
18/* In layman's terms: It's like cleaning a whiteboard. */
19/* ************************************************************************** */
20
21void ft_bzero(void *s, size_t n)
22{
23 char *p;
24
25 p = s;
26 while (n--)
27 *p++ = '\0';
28}
void ft_bzero(void *s, size_t n)
Definition ft_bzero.c:21