ft_strclr
This commit is contained in:
parent
32d984a9f7
commit
871545305c
7
Makefile
7
Makefile
@ -6,7 +6,7 @@
|
||||
# By: tmaze <marvin@42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2018/04/04 10:51:59 by tmaze #+# #+# #
|
||||
# Updated: 2018/04/06 19:04:49 by tmaze ### ########.fr #
|
||||
# Updated: 2018/04/07 00:38:15 by tmaze ### ########.fr #
|
||||
# #
|
||||
#******************************************************************************#
|
||||
|
||||
@ -48,7 +48,8 @@ SRCS = \
|
||||
ft_memalloc.c \
|
||||
ft_memdel.c \
|
||||
ft_strnew.c \
|
||||
ft_strdel.c
|
||||
ft_strdel.c \
|
||||
ft_strclr.c
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
INCLS = -I.
|
||||
|
||||
@ -68,4 +69,4 @@ clean:
|
||||
fclean: clean
|
||||
rm -f $(NAME)
|
||||
|
||||
re: fclean all
|
||||
re: fclean all
|
||||
|
22
ft_strclr.c
Normal file
22
ft_strclr.c
Normal file
@ -0,0 +1,22 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strclr.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2018/04/06 23:27:33 by tmaze #+# #+# */
|
||||
/* Updated: 2018/04/06 23:34:44 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
void strclr(char *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (s[i])
|
||||
s[i++] = '\0';
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user