Implemented every function from Part 1.
authorLukas Jiriste <ljiriste@student.42prague.com>
Tue, 15 Aug 2023 11:03:47 +0000 (13:03 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Tue, 15 Aug 2023 11:03:47 +0000 (13:03 +0200)
Added libft.h header and Makefile.
Everything passes norminette and compiles to libft.a on make command.

23 files changed:
Makefile [new file with mode: 0644]
ft_atoi.c [new file with mode: 0644]
ft_calloc.c [new file with mode: 0644]
ft_isascii.c [new file with mode: 0644]
ft_islower.c
ft_isprint.c [new file with mode: 0644]
ft_isspace.c [new file with mode: 0644]
ft_isupper.c
ft_memchr.c [new file with mode: 0644]
ft_memcmp.c [new file with mode: 0644]
ft_memmove.c
ft_memset.c
ft_strchr.c [new file with mode: 0644]
ft_strdup.c [new file with mode: 0644]
ft_strlcat.c
ft_strlcpy.c
ft_strlen.c
ft_strncmp.c [new file with mode: 0644]
ft_strnstr.c [new file with mode: 0644]
ft_strrchr.c [new file with mode: 0644]
ft_tolower.c [new file with mode: 0644]
ft_toupper.c [new file with mode: 0644]
libft.h [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..1ae2e12
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+CC = cc
+CFLAGS = -Wall -Wextra -Werror
+AR = ar
+
+RM = rm -f
+
+INCDIR = .
+SRCDIR = .
+# SOURCES = $(addprefix $(SRCDIR)/, ft_putchar.c ft_putstr.c ft_strcmp.c ft_strlen.c ft_swap.c)
+SOURCES = $(shell find $(SRCDIR) -name "*.c")
+OBJECTS = $(SOURCES:.c=.o)
+
+NAME = libft.a
+
+all : $(NAME)
+
+$(NAME) : $(OBJECTS)
+       $(AR) rcs $(NAME) $(OBJECTS)
+
+%.o : %.c
+       $(CC) $(CFLAGS) -o $@ -c $< -I $(INCDIR)
+
+clean :
+       $(RM) $(OBJECTS)
+
+fclean : clean 
+       $(RM) $(NAME)
+
+re : fclean
+       $(MAKE) all
diff --git a/ft_atoi.c b/ft_atoi.c
new file mode 100644 (file)
index 0000000..59dd217
--- /dev/null
+++ b/ft_atoi.c
@@ -0,0 +1,37 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_atoi.c                                          :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/06/13 13:44:39 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:45:44 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int    atoi(const char *nptr)
+{
+       int     res;
+       int     sign;
+
+       res = 0;
+       sign = 1;
+       while (ft_isspace(*nptr))
+               ++nptr;
+       if ((*nptr == '+' || *nptr == '-'))
+       {
+               if (*nptr == '-')
+                       sign *= -1;
+               ++nptr;
+       }
+       while (ft_isdigit(*nptr))
+       {
+               res *= 10;
+               res += *nptr - '0';
+               ++nptr;
+       }
+       return (sign * res);
+}
diff --git a/ft_calloc.c b/ft_calloc.c
new file mode 100644 (file)
index 0000000..b810d7e
--- /dev/null
@@ -0,0 +1,29 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_calloc.c                                        :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 11:34:52 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:54:11 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <stdlib.h>    // for malloc
+#include "libft.h"
+
+void   *calloc(size_t nmemb, size_t size)
+{
+       size_t  total_bytes;
+       void    *res;
+
+       if (nmemb == 0 || size == 0)
+               return (NULL);
+       total_bytes = nmemb * size;
+       if (total_bytes / size != nmemb)
+               return (NULL);
+       res = malloc(total_bytes);
+       ft_memset(res, 0, total_bytes);
+       return (res);
+}
diff --git a/ft_isascii.c b/ft_isascii.c
new file mode 100644 (file)
index 0000000..43682c0
--- /dev/null
@@ -0,0 +1,16 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_isascii.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 12:19:40 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:20:08 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+int    is_ascii(int c)
+{
+       return (0x00 <= c && c <= 0x7F);
+}
index ebcf47d418aee3bbb8b886920b6a7d32159ac9df..1d260060a8f9f21361e634a2d598534f10693a77 100644 (file)
@@ -6,13 +6,13 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/08/14 13:31:47 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:32:05 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 12:55:33 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
 #include "libft.h"
 
-static int     ft_islower(int c)
+int    ft_islower(int c)
 {
        return ('a' <= c && c <= 'z');
 }
diff --git a/ft_isprint.c b/ft_isprint.c
new file mode 100644 (file)
index 0000000..4cb7934
--- /dev/null
@@ -0,0 +1,18 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_isprint.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 12:17:32 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:20:22 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int    ft_isprint(int c)
+{
+       return (0x20 <= c && c <= 0x7E);
+}
diff --git a/ft_isspace.c b/ft_isspace.c
new file mode 100644 (file)
index 0000000..cbf9b09
--- /dev/null
@@ -0,0 +1,18 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_isspace.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 11:29:54 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 11:30:29 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int    is_space(int c)
+{
+       return (c == ' ' || ('\t' <= c && c <= '\r'));
+}
index 4a9acd2c30cf05b082a1faecf1888d95fe14b3b4..adddb5ba4620f42cd08953cf2b4487002029df49 100644 (file)
@@ -6,13 +6,13 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/08/14 13:31:05 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:31:31 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 12:55:24 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
 #include "libft.h"
 
-static int     ft_isupper(int c)
+int    ft_isupper(int c)
 {
        return ('A' <= c && c <= 'Z');
 }
diff --git a/ft_memchr.c b/ft_memchr.c
new file mode 100644 (file)
index 0000000..3a4a944
--- /dev/null
@@ -0,0 +1,29 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_memchr.c                                        :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 10:56:53 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 11:01:34 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <stddef.h>
+#include <sys/types.h>
+#include "libft.h"
+
+void   *memchr(const void *s, int c, size_t n)
+{
+       size_t  i;
+
+       i = 0;
+       while (i < n)
+       {
+               if (*((unsigned char *)s + i) == (unsigned char)c)
+                       return ((unsigned char *)s + i);
+               ++i;
+       }
+       return (NULL);
+}
diff --git a/ft_memcmp.c b/ft_memcmp.c
new file mode 100644 (file)
index 0000000..e3c320c
--- /dev/null
@@ -0,0 +1,28 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_memcmp.c                                        :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 11:06:15 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:53:17 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <sys/types.h>
+#include "libft.h"
+
+int    ft_memcmp(const void *s1, const void *s2, size_t n)
+{
+       size_t  i;
+
+       i = 0;
+       while (*((unsigned char *)s1 + i) == *((unsigned char *)s2 + i)
+               && i + 1 < n)
+               ++i;
+       if (n > 0)
+               return (*((unsigned char *)s1 + i) == *((unsigned char *)s2 + i));
+       else
+               return (0);
+}
index 83692d1a12fe059596603d9fd033dda0d3a3df06..8cb233dce1be08807660c02c2b6067f4432bebf2 100644 (file)
@@ -6,14 +6,14 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/08/14 13:36:32 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:37:03 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 12:03:46 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
 #include <sys/types.h>
 #include "libft.h"
 
-void *ft_memmove(void *dest, const void *src, size_t n)
+void   *ft_memmove(void *dest, const void *src, size_t n)
 {
        size_t  i;
 
index bfa046820275bca11980f8c83e0f6bb80a30e4c8..cbc4239e814d54db8e950326464c54f5dc818492 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/08/14 13:13:22 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:38:38 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 10:39:20 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -16,6 +16,6 @@
 void   *ft_memset(void *s, int c, size_t n)
 {
        while (n > 0)
-               *((unsigned char *)s + (--n)) = c;
+               *((unsigned char *)s + (--n)) = (unsigned char)c;
        return (s);
 }
diff --git a/ft_strchr.c b/ft_strchr.c
new file mode 100644 (file)
index 0000000..594d6a2
--- /dev/null
@@ -0,0 +1,25 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_strchr.c                                        :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 10:41:10 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:51:36 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <stddef.h>
+#include "libft.h"
+
+char   *strchr(const char *s, int c)
+{
+       while (*s != '\0')
+       {
+               if (*s == c)
+                       return ((char *)s);
+               ++s;
+       }
+       return (NULL);
+}
diff --git a/ft_strdup.c b/ft_strdup.c
new file mode 100644 (file)
index 0000000..d16d5e0
--- /dev/null
@@ -0,0 +1,26 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_strdup.c                                        :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/06/17 13:33:49 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:52:18 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <stdlib.h>    // For the malloc function
+#include "libft.h"
+
+char   *ft_strdup(const char *s)
+{
+       char    *dest;
+       size_t  s_len;
+
+       s_len = ft_strlen(s);
+       dest = malloc((s_len + 1) * sizeof(char));
+       if (dest)
+               ft_strlcpy(dest, s, s_len + 1);
+       return (dest);
+}
index ed6e7b5c1f0ac5550539171de283d8dcb1cf55bb..1a435b6321f824abca355354178369d3be5f1718 100644 (file)
@@ -6,14 +6,14 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/06/12 17:32:33 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:39:39 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 12:55:06 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
 #include <sys/types.h>
 #include "libft.h"
 
-size_t ft_strlcat(char *dst, char *src, size_t size)
+size_t ft_strlcat(char *dst, const char *src, size_t size)
 {
        size_t  length;
 
index 3f1d16ce20822f7ad692cc9ee00b8730b57438e2..4b42275fa98b04ad3314350529618ab132f4cdb7 100644 (file)
@@ -6,14 +6,14 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/06/11 17:28:43 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:29:38 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 12:55:52 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
 #include <sys/types.h>
 #include "libft.h"
 
-size_t ft_strlcpy(char *dst, char *src, size_t size)
+size_t ft_strlcpy(char *dst, const char *src, size_t size)
 {
        size_t  i;
 
index f4ae6c7bb4fbaf21f4e60a14db2c67f62fd93dd1..b27da5361080e5beb5e7e3152acc38be855f7065 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2023/08/14 13:40:59 by ljiriste          #+#    #+#             */
-/*   Updated: 2023/08/14 13:41:35 by ljiriste         ###   ########.fr       */
+/*   Updated: 2023/08/15 12:05:43 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -20,5 +20,5 @@ size_t        ft_strlen(const char *s)
        len = 0;
        while (s[len] != '\0')
                ++len;
-       return len;
+       return (len);
 }
diff --git a/ft_strncmp.c b/ft_strncmp.c
new file mode 100644 (file)
index 0000000..ef313b3
--- /dev/null
@@ -0,0 +1,27 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_strncmp.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/06/12 17:02:07 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:56:20 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <sys/types.h>
+#include "libft.h"
+
+int    ft_strncmp(const char *s1, const char *s2, size_t n)
+{
+       size_t  i;
+
+       i = 0;
+       while (s1[i] == s2[i] && s1[i] != '\0' && s2[i] != '\0' && i + 1 < n)
+               ++i;
+       if (n > 0)
+               return (s1[i] - s2[i]);
+       else
+               return (0);
+}
diff --git a/ft_strnstr.c b/ft_strnstr.c
new file mode 100644 (file)
index 0000000..ccb257c
--- /dev/null
@@ -0,0 +1,31 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_strnstr.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/06/12 17:15:34 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:50:26 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <stddef.h>    // For the NULL pointer
+#include <sys/types.h>
+#include "libft.h"
+
+char   *ft_strnstr(const char *big, const char *little, size_t len)
+{
+       size_t  little_len;
+       size_t  i;
+
+       little_len = ft_strlen(little);
+       i = 0;
+       while (big[i] != '\0' && i + little_len <= len)
+       {
+               if (!(ft_strncmp(big + i, little, little_len)))
+                       return ((char *)big + i);
+               ++i;
+       }
+       return (NULL);
+}
diff --git a/ft_strrchr.c b/ft_strrchr.c
new file mode 100644 (file)
index 0000000..eeb3d46
--- /dev/null
@@ -0,0 +1,28 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_strrchr.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 10:46:09 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:51:17 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include <stddef.h>
+#include "libft.h"
+
+char   *strrchr(const char *s, int c)
+{
+       char    *result;
+
+       result = NULL;
+       while (*s != '\0')
+       {
+               if (*s == c)
+                       result = (char *)s;
+               ++s;
+       }
+       return (result);
+}
diff --git a/ft_tolower.c b/ft_tolower.c
new file mode 100644 (file)
index 0000000..5e169b0
--- /dev/null
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_tolower.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 10:36:54 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:53:38 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int    ft_tolower(int c)
+{
+       if (ft_isupper(c))
+               c = c + 'a' - 'A';
+       return (c);
+}
diff --git a/ft_toupper.c b/ft_toupper.c
new file mode 100644 (file)
index 0000000..1e79b9d
--- /dev/null
@@ -0,0 +1,20 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   ft_toupper.c                                       :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 10:35:21 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:54:28 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#include "libft.h"
+
+int    ft_toupper(int c)
+{
+       if (ft_islower(c))
+               c = c + 'A' - 'a';
+       return (c);
+}
diff --git a/libft.h b/libft.h
new file mode 100644 (file)
index 0000000..09b8629
--- /dev/null
+++ b/libft.h
@@ -0,0 +1,49 @@
+/* ************************************************************************** */
+/*                                                                            */
+/*                                                        :::      ::::::::   */
+/*   libft.h                                            :+:      :+:    :+:   */
+/*                                                    +:+ +:+         +:+     */
+/*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
+/*                                                +#+#+#+#+#+   +#+           */
+/*   Created: 2023/08/15 12:58:15 by ljiriste          #+#    #+#             */
+/*   Updated: 2023/08/15 12:58:48 by ljiriste         ###   ########.fr       */
+/*                                                                            */
+/* ************************************************************************** */
+
+#ifndef LIBFT_H
+# define LIBFT_H
+
+# include <sys/types.h>
+
+int            ft_isalnum(int c);
+int            ft_isalpha(int c);
+int            ft_isdigit(int c);
+int            ft_islower(int c);
+int            ft_isprint(int c);
+int            ft_isspace(int c);
+int            ft_isupper(int c);
+int            ft_isascii(int c);
+
+void   *ft_memset(void *s, int c, size_t n);
+void   *ft_memcpy(void *dest, const void *src, size_t n);
+void   *ft_memmove(void *dest, const void *src, size_t n);
+void   *ft_memchr(const void *s, int c, size_t n);
+void   *ft_calloc(size_t nmemb, size_t size);
+void   ft_bzero(void *s, size_t n);
+int            ft_memcmp(const void *s1, const void *s2, size_t n);
+
+size_t ft_strlen(const char *s);
+size_t ft_strlcpy(char *dst, const char *src, size_t size);
+size_t ft_strlcat(char *dst, const char *src, size_t size);
+int            ft_strncmp(const char *s1, const char *s2, size_t n);
+char   *ft_strchr(const char *s, int c);
+char   *ft_strrchr(const char *s, int c);
+char   *ft_strnstr(const char *big, const char *little, size_t len);
+char   *ft_strdup(const char *s);
+
+int            ft_toupper(int c);
+int            ft_tolower(int c);
+
+int            ft_atoi(const char *nptr);
+
+#endif