aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristopher Uhlig2024-08-11 15:15:06 +0200
committerDominik Kaiser2024-08-11 15:42:30 +0200
commit0d4f9e94f6d28a154ae4be3b918bfb014b4fa1e0 (patch)
treeff66a099b7f364dc2e50d91b8b397df0ba1e4e0c /lib
parent8abf7abdc9d49f52c4fcad0afc92730c4c195b7f (diff)
downloadminishell-0d4f9e94f6d28a154ae4be3b918bfb014b4fa1e0.tar.gz
minishell-0d4f9e94f6d28a154ae4be3b918bfb014b4fa1e0.zip
fixed |> fixed norm added new function
Diffstat (limited to 'lib')
-rw-r--r--lib/libft/Makefile1
-rw-r--r--lib/libft/ft_isspace.c20
-rw-r--r--lib/libft/libft.h3
3 files changed, 23 insertions, 1 deletions
diff --git a/lib/libft/Makefile b/lib/libft/Makefile
index 6951c43..6f2950c 100644
--- a/lib/libft/Makefile
+++ b/lib/libft/Makefile
@@ -10,6 +10,7 @@ SRC = ft_atoi.c \
ft_isascii.c \
ft_isdigit.c \
ft_isprint.c \
+ ft_isspace.c \
ft_itoa.c \
ft_memchr.c \
ft_memcmp.c \
diff --git a/lib/libft/ft_isspace.c b/lib/libft/ft_isspace.c
new file mode 100644
index 0000000..63f21fa
--- /dev/null
+++ b/lib/libft/ft_isspace.c
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/* */
+/* ::: :::::::: */
+/* ft_isspace.c :+: :+: :+: */
+/* +:+ +:+ +:+ */
+/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
+/* +#+#+#+#+#+ +#+ */
+/* Created: 2024/08/11 13:59:45 by chuhlig #+# #+# */
+/* Updated: 2024/08/11 14:04:23 by chuhlig ### ########.fr */
+/* */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int ft_isspace(char c)
+{
+ if (c == ' ' || c == '\t')
+ return (1);
+ return (0);
+}
diff --git a/lib/libft/libft.h b/lib/libft/libft.h
index 67fbb0f..abb739d 100644
--- a/lib/libft/libft.h
+++ b/lib/libft/libft.h
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/10 16:37:54 by dkaiser #+# #+# */
-/* Updated: 2024/08/05 13:55:13 by chuhlig ### ########.fr */
+/* Updated: 2024/08/11 14:01:57 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -24,6 +24,7 @@ int ft_isalpha(int c);
int ft_isdigit(int c);
int ft_isalnum(int c);
int ft_isprint(int c);
+int ft_isspace(char c);
int ft_isascii(int c);
int ft_strlen(const char *str);
void *ft_memset(void *b, int c, size_t len);