From 70e3b4133b89e4e77a67139ccaa37322e2507e49 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 1 Sep 2020 18:28:12 +0200 Subject: Added quotes multiline --- libft/Makefile | 1 + libft/include/libft.h | 1 + libft/src/ft_isspace.c | 1 - libft/src/ft_iswhitespace.c | 25 +++++++++++++++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 libft/src/ft_iswhitespace.c (limited to 'libft') diff --git a/libft/Makefile b/libft/Makefile index 6ada2e1..431ec0b 100644 --- a/libft/Makefile +++ b/libft/Makefile @@ -78,6 +78,7 @@ SRCS_NAME += ft_putnbr_base.c SRCS_NAME += ft_strcat.c SRCS_NAME += ft_strcmp.c SRCS_NAME += ft_isspace.c +SRCS_NAME += ft_iswhitespace.c SRCS_NAME += ft_sqrt.c SRCS_NAME += ft_intlen.c SRCS_NAME += ft_intlen_base.c diff --git a/libft/include/libft.h b/libft/include/libft.h index 96615fd..68b8d9b 100644 --- a/libft/include/libft.h +++ b/libft/include/libft.h @@ -137,6 +137,7 @@ uint8_t ft_uintlen(unsigned long n); uint8_t ft_uintlen_base(unsigned long n, char *base); int ft_memcmp(const void *s1, const void *s2, size_t n); t_bool ft_isspace(int c); +t_bool ft_iswhitespace(int c); t_bool ft_ischarset(const char *charset, int c); t_bool ft_isupper(int c); t_bool ft_islower(int c); diff --git a/libft/src/ft_isspace.c b/libft/src/ft_isspace.c index b9b653f..8454c7c 100644 --- a/libft/src/ft_isspace.c +++ b/libft/src/ft_isspace.c @@ -11,7 +11,6 @@ /* ************************************************************************** */ #include -#include t_bool ft_isspace(int c) diff --git a/libft/src/ft_iswhitespace.c b/libft/src/ft_iswhitespace.c new file mode 100644 index 0000000..3bb5868 --- /dev/null +++ b/libft/src/ft_iswhitespace.c @@ -0,0 +1,25 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_iswhitespace.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/14 17:06:40 by rbousset #+# #+# */ +/* Updated: 2020/02/14 17:06:40 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include + +t_bool + ft_iswhitespace(int c) +{ + if (c == '\t' || + c == '\v' || + c == '\f' || + c == '\r' || + c == ' ') + return (TRUE); + return (FALSE); +} -- cgit v1.2.3