aboutsummaryrefslogtreecommitdiff
path: root/lib/libft
diff options
context:
space:
mode:
authorDominik Kaiser2024-08-29 15:27:07 +0200
committerDominik Kaiser2024-08-29 15:27:07 +0200
commitad4591381f9c3bb713da4d519caeea60ff3b99e7 (patch)
tree6883f97be0f8587a2aef9595954da672c2e68121 /lib/libft
parent99e8655aaf9827c7d5248c7f3d0913fcb1377cfb (diff)
parent0d4f9e94f6d28a154ae4be3b918bfb014b4fa1e0 (diff)
downloadminishell-ad4591381f9c3bb713da4d519caeea60ff3b99e7.tar.gz
minishell-ad4591381f9c3bb713da4d519caeea60ff3b99e7.zip
Merge branch 'main' into parser
Diffstat (limited to 'lib/libft')
-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);