commit 94cd5aac51953c9c6b5dd283d6ba78493a80b438 Author: rzy Date: Mon Aug 31 02:16:33 2026 +0200 init diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..adc4e23 --- /dev/null +++ b/Makefile @@ -0,0 +1,48 @@ +CC := cc +CFLAGS := -Wall -Wextra -Werror + +SRCS := ft_isalpha.c \ + ft_isdigit.c \ + ft_isalnum.c \ + ft_isascii.c \ + ft_isprint.c \ + ft_strlen.c \ + ft_memset.c \ + ft_bzero.c \ + ft_memcpy.c \ + ft_memmove.c \ + ft_strlcpy.c \ + ft_strlcat.c \ + ft_toupper.c \ + ft_tolower.c \ + ft_strchr.c \ + ft_strrchr.c \ + ft_strncmp.c \ + ft_memchr.c \ + ft_memcmp.c \ + ft_strnstr.c \ + ft_atoi.c \ + ft_calloc.c \ + ft_strdup.c + +OBJS := $(SRCS:.c=.o) + +NAME := libft.a + +all: $(NAME) + +$(NAME): $(OBJS) + ar -crs $(NAME) $(OBJS) + +%.o: %.c + $(CC) $(CFLAGS) -c $^ -o $@ + +clean: + rm -f $(OBJS) + +fclean: clean + rm -f $(NAME) + +re: fclean all + +.PHONY: all clean fclean re diff --git a/ft_atoi.c b/ft_atoi.c new file mode 100644 index 0000000..53a9fb0 --- /dev/null +++ b/ft_atoi.c @@ -0,0 +1,42 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_atoi.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:34:29 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:37:29 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +static int ft_isspace(char c) +{ + return (c == ' ' || (c >= '\t' && c <= '\r')); +} + +int ft_atoi(const char *nptr) +{ + int result; + int sign; + int i; + + result = 0; + sign = 1; + i = 0; + while (ft_isspace(nptr[i])) + ++i; + if (nptr[i] == '+' || nptr[i] == '-') + { + if (nptr[i] == '-') + sign = -1; + ++i; + } + while (ft_isdigit(nptr[i])) + { + result = (result * 10) + (nptr[i] - '0'); + ++i; + } + return (result * sign); +} diff --git a/ft_bzero.c b/ft_bzero.c new file mode 100644 index 0000000..1155b08 --- /dev/null +++ b/ft_bzero.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_bzero.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:35:16 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:38:02 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +void ft_bzero(void *s, size_t n) +{ + unsigned char *ptr; + size_t i; + + ptr = (unsigned char *)s; + i = 0; + while (i < n) + { + ptr[i] = 0; + ++i; + } +} diff --git a/ft_calloc.c b/ft_calloc.c new file mode 100644 index 0000000..59cacbe --- /dev/null +++ b/ft_calloc.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_calloc.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/24 01:03:26 by rzy #+# #+# */ +/* Updated: 2026/08/24 01:03:38 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +void *ft_calloc(size_t n, size_t size) +{ + unsigned char *ptr; + size_t i; + + ptr = (unsigned char *)malloc(n * size); + if (ptr == NULL) + return (NULL); + i = 0; + while (i < (n * size)) + { + ptr[i] = 0; + ++i; + } + return (ptr); +} diff --git a/ft_isalnum.c b/ft_isalnum.c new file mode 100644 index 0000000..e3cf5e3 --- /dev/null +++ b/ft_isalnum.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isalnum.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:22:49 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:23:32 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isalnum(int c) +{ + return (ft_isalpha(c) || ft_isdigit(c)); +} diff --git a/ft_isalpha.c b/ft_isalpha.c new file mode 100644 index 0000000..c49b3ee --- /dev/null +++ b/ft_isalpha.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isalpha.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:20:02 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:20:41 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isalpha(int c) +{ + return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); +} diff --git a/ft_isascii.c b/ft_isascii.c new file mode 100644 index 0000000..2163505 --- /dev/null +++ b/ft_isascii.c @@ -0,0 +1,17 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isascii.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:24:58 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:26:30 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +int ft_isascii(int c) +{ + return (c >= 0 && c <= 127); +} diff --git a/ft_isdigit.c b/ft_isdigit.c new file mode 100644 index 0000000..dbfda84 --- /dev/null +++ b/ft_isdigit.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isdigit.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:20:52 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:22:21 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_isdigit(int c) +{ + return (c >= '0' && c <= '9'); +} diff --git a/ft_isprint.c b/ft_isprint.c new file mode 100644 index 0000000..faea9db --- /dev/null +++ b/ft_isprint.c @@ -0,0 +1,17 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isprint.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:26:41 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:27:43 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +int ft_isprint(int c) +{ + return (c >= 32 && c <= 126); +} diff --git a/ft_memchr.c b/ft_memchr.c new file mode 100644 index 0000000..f4de342 --- /dev/null +++ b/ft_memchr.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:21:11 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:21:27 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +void *ft_memchr(const void *s, int c, size_t n) +{ + unsigned char *ptr; + size_t i; + + ptr = (unsigned char *)s; + i = 0; + while (i < n) + { + if (ptr[i] == (unsigned char)c) + return ((void *)s + i); + ++i; + } + return (NULL); +} diff --git a/ft_memcmp.c b/ft_memcmp.c new file mode 100644 index 0000000..f4c283a --- /dev/null +++ b/ft_memcmp.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memcmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:24:25 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:26:32 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +int ft_memcmp(const void *s1, const void *s2, size_t n) +{ + unsigned char *s1_ptr; + unsigned char *s2_ptr; + size_t i; + + s1_ptr = (unsigned char *)s1; + s2_ptr = (unsigned char *)s2; + i = 0; + while (i < n) + { + if (s1_ptr[i] != s2_ptr[i]) + return (s1_ptr[i] - s2_ptr[i]); + ++i; + } + return (0); +} diff --git a/ft_memcpy.c b/ft_memcpy.c new file mode 100644 index 0000000..32118ff --- /dev/null +++ b/ft_memcpy.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:39:05 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:42:56 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +void *ft_memcpy(void *dest, const void *src, size_t n) +{ + unsigned char *dest_ptr; + unsigned char *src_ptr; + size_t i; + + dest_ptr = (unsigned char *)dest; + src_ptr = (unsigned char *)src; + i = 0; + while (i < n) + { + dest_ptr[i] = src_ptr[i]; + ++i; + } + return (dest); +} diff --git a/ft_memmove.c b/ft_memmove.c new file mode 100644 index 0000000..b63157f --- /dev/null +++ b/ft_memmove.c @@ -0,0 +1,41 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memmove.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:44:14 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:56:01 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +void *ft_memmove(void *dest, const void *src, size_t n) +{ + unsigned char *dest_ptr; + unsigned char *src_ptr; + int i; + + dest_ptr = (unsigned char *)dest; + src_ptr = (unsigned char *)src; + if (src > dest) + { + i = 0; + while ((size_t)i < n) + { + dest_ptr[i] = src_ptr[i]; + ++i; + } + } + else + { + i = n - 1; + while (i >= 0) + { + dest_ptr[i] = src_ptr[i]; + --i; + } + } + return (dest); +} diff --git a/ft_memset.c b/ft_memset.c new file mode 100644 index 0000000..2289a4f --- /dev/null +++ b/ft_memset.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_memset.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:29:57 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:31:46 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +void *ft_memset(void *s, int c, size_t n) +{ + unsigned char *ptr; + size_t i; + + ptr = (unsigned char *)s; + i = 0; + while (i < n) + { + ptr[i] = (unsigned char)c; + ++i; + } + return (s); +} diff --git a/ft_strchr.c b/ft_strchr.c new file mode 100644 index 0000000..5ef1dc1 --- /dev/null +++ b/ft_strchr.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:12:35 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:15:51 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +char *ft_strchr(const char *s, int c) +{ + int i; + + i = 0; + while (s[i]) + { + if (s[i] == (char)c) + return ((char *)&s[i]); + ++i; + } + if (s[i] == (char)c) + return ((char *)&s[i]); + return (NULL); +} diff --git a/ft_strdup.c b/ft_strdup.c new file mode 100644 index 0000000..6a272d8 --- /dev/null +++ b/ft_strdup.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strdup.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/24 01:09:08 by rzy #+# #+# */ +/* Updated: 2026/08/24 01:09:25 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +char *ft_strdup(const char *s) +{ + int i; + char *dup; + + dup = malloc(sizeof (char) * (ft_strlen(s) + 1)); + if (dup == NULL) + return (NULL); + i = 0; + while (s[i]) + { + dup[i] = s[i]; + ++i; + } + dup[i] = 0; + return (dup); +} diff --git a/ft_strlcat.c b/ft_strlcat.c new file mode 100644 index 0000000..796ee24 --- /dev/null +++ b/ft_strlcat.c @@ -0,0 +1,34 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:01:11 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:04:11 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +size_t ft_strlcat(char *dest, const char *src, size_t size) +{ + size_t dest_len; + size_t src_len; + + dest_len = ft_strlen(dest); + src_len = ft_strlen(src); + if (dest_len >= size) + return (src_len + size); + if (src_len < size - dest_len) + { + ft_memcpy(dest + dest_len, src, src_len); + dest[dest_len + src_len] = 0; + } + else + { + ft_memcpy(dest + dest_len, src, size - dest_len - 1); + dest[size - 1] = 0; + } + return (dest_len + src_len); +} diff --git a/ft_strlcpy.c b/ft_strlcpy.c new file mode 100644 index 0000000..851a5cc --- /dev/null +++ b/ft_strlcpy.c @@ -0,0 +1,28 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:56:51 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:00:02 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +size_t ft_strlcpy(char *dest, const char *src, size_t size) +{ + size_t i; + + i = 0; + if (size == 0) + return (ft_strlen(src)); + while (src[i] && i < size - 1) + { + dest[i] = src[i]; + ++i; + } + dest[i] = 0; + return (ft_strlen(src)); +} diff --git a/ft_strlen.c b/ft_strlen.c new file mode 100644 index 0000000..08026f8 --- /dev/null +++ b/ft_strlen.c @@ -0,0 +1,22 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlen.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 22:28:12 by rzy #+# #+# */ +/* Updated: 2026/08/23 22:28:51 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +size_t ft_strlen(const char *s) +{ + size_t i; + + i = 0; + while (s[i]) + ++i; + return (i); +} diff --git a/ft_strncmp.c b/ft_strncmp.c new file mode 100644 index 0000000..5b7cf7e --- /dev/null +++ b/ft_strncmp.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:18:37 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:20:35 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +int ft_strncmp(const char *s1, const char *s2, size_t n) +{ + unsigned char *s1_ptr; + unsigned char *s2_ptr; + size_t i; + + s1_ptr = (unsigned char *)s1; + s2_ptr = (unsigned char *)s2; + i = 0; + while (i < n) + { + if (!s1_ptr[i] && !s2_ptr[i]) + return (0); + if (s1_ptr[i] != s2_ptr[i]) + return (s1_ptr[i] - s2_ptr[i]); + ++i; + } + return (0); +} diff --git a/ft_strnstr.c b/ft_strnstr.c new file mode 100644 index 0000000..cda5205 --- /dev/null +++ b/ft_strnstr.c @@ -0,0 +1,32 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strnstr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:27:28 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:33:18 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +char *ft_strnstr(const char *haystack, const char *needle, size_t n) +{ + size_t i; + size_t j; + + if (!needle[0]) + return ((char *)(haystack)); + i = 0; + while (i < n && haystack[i]) + { + j = 0; + while (i + j < n && needle[j] && haystack[i + j] == needle[j]) + ++j; + if (!needle[j]) + return ((char *)&haystack[i]); + ++i; + } + return (NULL); +} diff --git a/ft_strrchr.c b/ft_strrchr.c new file mode 100644 index 0000000..a5526b8 --- /dev/null +++ b/ft_strrchr.c @@ -0,0 +1,30 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strrchr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:16:26 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:17:56 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +char *ft_strrchr(const char *s, int c) +{ + int i; + char *occ; + + i = 0; + occ = NULL; + while (s[i]) + { + if (s[i] == (char)c) + occ = (char *)&s[i]; + ++i; + } + if (s[i] == (char)c) + occ = (char *)&s[i]; + return (occ); +} diff --git a/ft_tolower.c b/ft_tolower.c new file mode 100644 index 0000000..7a3ff26 --- /dev/null +++ b/ft_tolower.c @@ -0,0 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_tolower.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:11:15 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:11:34 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +int ft_tolower(int c) +{ + if (c >= 'A' && c <= 'Z') + return (c + 32); + return (c); +} diff --git a/ft_toupper.c b/ft_toupper.c new file mode 100644 index 0000000..e034997 --- /dev/null +++ b/ft_toupper.c @@ -0,0 +1,19 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_toupper.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 23:05:53 by rzy #+# #+# */ +/* Updated: 2026/08/23 23:11:10 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ +#include "libft.h" + +int ft_toupper(int c) +{ + if (c >= 'a' && c <= 'z') + return (c - 32); + return (c); +} diff --git a/libft.h b/libft.h new file mode 100644 index 0000000..afd0c3d --- /dev/null +++ b/libft.h @@ -0,0 +1,43 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* libft.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rzy +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/08/23 19:15:48 by rzy #+# #+# */ +/* Updated: 2026/08/23 19:16:01 by rzy ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#ifndef LIBFT_H +# define LIBFT_H + +# include +# include + +int ft_isalpha(int c); +int ft_isdigit(int c); +int ft_isalnum(int c); +int ft_isascii(int c); +int ft_isprint(int c); +size_t ft_strlen(const char *s); +void *ft_memset(void *s, int c, size_t n); +void ft_bzero(void *s, 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); +size_t ft_strlcpy(char *dest, const char *src, size_t size); +size_t ft_strlcat(char *dest, const char *src, size_t size); +int ft_toupper(int c); +int ft_tolower(int c); +char *ft_strchr(const char *s, int c); +char *ft_strrchr(const char *s, int c); +int ft_strncmp(const char *s1, const char *s2, size_t n); +void *ft_memchr(const void *s, int c, size_t n); +int ft_memcmp(const void *s1, const void *s2, size_t n); +char *ft_strnstr(const char *haystack, const char *needle, size_t n); +int ft_atoi(const char *nptr); +void *ft_calloc(size_t n, size_t size); +char *ft_strdup(const char *s); + +#endif