From 85c77f916c85d539adbbd971fbd6bafddb4c9cad Mon Sep 17 00:00:00 2001 From: Jack Halford Date: Sat, 27 Aug 2016 22:57:08 +0200 Subject: [PATCH] part 1 done, not tested --- libftasm/Makefile | 37 ++++++++++++++++++++++++++++++++++ libftasm/auteur | 1 + libftasm/ft_atoi.c | 47 +++++++++++++++++++++++++++++++++++++++++++ libftasm/ft_bzero.c | 10 +++++++++ libftasm/ft_isalnum.c | 13 ++++++++++++ libftasm/ft_isalpha.c | 11 ++++++++++ libftasm/ft_isascii.c | 11 ++++++++++ libftasm/ft_isdigit.c | 11 ++++++++++ libftasm/ft_isprint.c | 11 ++++++++++ libftasm/ft_memccpy.c | 15 ++++++++++++++ libftasm/ft_memchr.c | 17 ++++++++++++++++ libftasm/ft_memcmp.c | 16 +++++++++++++++ libftasm/ft_memcpy.c | 11 ++++++++++ libftasm/ft_memmove.c | 14 +++++++++++++ libftasm/ft_memset.c | 11 ++++++++++ libftasm/ft_strcat.c | 29 ++++++++++++++++++++++++++ libftasm/ft_strchr.c | 17 ++++++++++++++++ libftasm/ft_strcmp.c | 31 ++++++++++++++++++++++++++++ libftasm/ft_strcpy.c | 27 +++++++++++++++++++++++++ libftasm/ft_strdup.c | 19 +++++++++++++++++ libftasm/ft_strlcat.c | 31 ++++++++++++++++++++++++++++ libftasm/ft_strlen.c | 11 ++++++++++ libftasm/ft_strncat.c | 29 ++++++++++++++++++++++++++ libftasm/ft_strncmp.c | 33 ++++++++++++++++++++++++++++++ libftasm/ft_strncpy.c | 31 ++++++++++++++++++++++++++++ libftasm/ft_strnstr.c | 23 +++++++++++++++++++++ libftasm/ft_strrchr.c | 19 +++++++++++++++++ libftasm/ft_strstr.c | 35 ++++++++++++++++++++++++++++++++ libftasm/ft_tolower.c | 11 ++++++++++ libftasm/ft_toupper.c | 11 ++++++++++ libftasm/libft.h | 32 +++++++++++++++++++++++++++++ 31 files changed, 625 insertions(+) create mode 100644 libftasm/Makefile create mode 100644 libftasm/auteur create mode 100644 libftasm/ft_atoi.c create mode 100644 libftasm/ft_bzero.c create mode 100644 libftasm/ft_isalnum.c create mode 100644 libftasm/ft_isalpha.c create mode 100644 libftasm/ft_isascii.c create mode 100644 libftasm/ft_isdigit.c create mode 100644 libftasm/ft_isprint.c create mode 100644 libftasm/ft_memccpy.c create mode 100644 libftasm/ft_memchr.c create mode 100644 libftasm/ft_memcmp.c create mode 100644 libftasm/ft_memcpy.c create mode 100644 libftasm/ft_memmove.c create mode 100644 libftasm/ft_memset.c create mode 100644 libftasm/ft_strcat.c create mode 100644 libftasm/ft_strchr.c create mode 100644 libftasm/ft_strcmp.c create mode 100644 libftasm/ft_strcpy.c create mode 100644 libftasm/ft_strdup.c create mode 100644 libftasm/ft_strlcat.c create mode 100644 libftasm/ft_strlen.c create mode 100644 libftasm/ft_strncat.c create mode 100644 libftasm/ft_strncmp.c create mode 100644 libftasm/ft_strncpy.c create mode 100644 libftasm/ft_strnstr.c create mode 100644 libftasm/ft_strrchr.c create mode 100644 libftasm/ft_strstr.c create mode 100644 libftasm/ft_tolower.c create mode 100644 libftasm/ft_toupper.c create mode 100644 libftasm/libft.h diff --git a/libftasm/Makefile b/libftasm/Makefile new file mode 100644 index 00000000..43ddd412 --- /dev/null +++ b/libftasm/Makefile @@ -0,0 +1,37 @@ +NAME = libft.a +CC = gcc +AR = ar -rc + +D_SRC = . +D_OBJ = obj + +O_FLAGS = +W_FLAGS = -Wall -Wextra -Werror +DEBUG = +MKDIR = mkdir -p +RM = /bin/rm -rf + +F_SRC := $(shell ls -1 $(D_SRC) | grep "\.c$$") +F_OBJ := $(F_SRC:.c=.o) +F_OBJ := $(addprefix $(D_OBJ)/, $(F_OBJ)) + +.PHONY: all clean fclean re + +all: $(NAME) + +$(D_OBJ)/%.o: $(D_SRC)/%.c + @$(MKDIR) $(D_OBJ) + @$(CC) $(W_FLAGS) -c $< -o $@ $(DEBUG) + @echo "Compiling "$<"..." + +$(NAME): $(F_OBJ) + $(AR) $(NAME) $(F_OBJ) + ranlib $(NAME) + +clean: + $(RM) $(D_OBJ) + +fclean: clean + $(RM) $(NAME) + +re: fclean all diff --git a/libftasm/auteur b/libftasm/auteur new file mode 100644 index 00000000..b0e9923f --- /dev/null +++ b/libftasm/auteur @@ -0,0 +1 @@ +jhalford diff --git a/libftasm/ft_atoi.c b/libftasm/ft_atoi.c new file mode 100644 index 00000000..459e57bf --- /dev/null +++ b/libftasm/ft_atoi.c @@ -0,0 +1,47 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_atoi.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/03 16:17:21 by jhalford #+# #+# */ +/* Updated: 2016/08/07 18:10:10 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +static int ft_iswhitespace(char c) +{ + if (c == ' ' || c == '\t' || c == '\n') + return (1); + else if (c == '\v' || c == '\f' || c == '\r') + return (1); + return (0); +} + +int ft_atoi(const char *str) +{ + int i; + int res; + int sign; + + i = 0; + res = 0; + sign = 1; + while (ft_iswhitespace(str[i])) + i++; + if (str[i] == '-' || str[i] == '+') + { + if (str[i + 1] >= '0' && str[i + 1] <= '9') + { + sign = (str[i] == '+') ? 1 : -1; + i++; + } + else + return (0); + } + while (str[i] >= '0' && str[i] <= '9') + res = res * 10 + str[i++] - '0'; + res *= sign; + return (res); +} diff --git a/libftasm/ft_bzero.c b/libftasm/ft_bzero.c new file mode 100644 index 00000000..77087ab0 --- /dev/null +++ b/libftasm/ft_bzero.c @@ -0,0 +1,10 @@ +#include "libft.h" + +void ft_bzero(void *s, size_t n) +{ + size_t i; + + i = -1; + while (++i < n) + *(char *)s++ = 0; +} diff --git a/libftasm/ft_isalnum.c b/libftasm/ft_isalnum.c new file mode 100644 index 00000000..0b46b15e --- /dev/null +++ b/libftasm/ft_isalnum.c @@ -0,0 +1,13 @@ +#include "libft.h" + +int ft_isalnum(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if ((a >= 'a' && a <= 'z') + || (a >= 'A' && a <= 'Z') + || (a >= '0' && a <= '9')) + return (a); + return (0); +} diff --git a/libftasm/ft_isalpha.c b/libftasm/ft_isalpha.c new file mode 100644 index 00000000..97d0ec43 --- /dev/null +++ b/libftasm/ft_isalpha.c @@ -0,0 +1,11 @@ +#include "libft.h" + +int ft_isalpha(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if ((a >= 'a' && a <= 'z') || (a >= 'A' && a <= 'Z')) + return (a); + return (0); +} diff --git a/libftasm/ft_isascii.c b/libftasm/ft_isascii.c new file mode 100644 index 00000000..d15a4ed8 --- /dev/null +++ b/libftasm/ft_isascii.c @@ -0,0 +1,11 @@ +#include "libft.h" + +int ft_isascii(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if (a >= 0 && a <= 127) + return (a); + return (0); +} diff --git a/libftasm/ft_isdigit.c b/libftasm/ft_isdigit.c new file mode 100644 index 00000000..8c811800 --- /dev/null +++ b/libftasm/ft_isdigit.c @@ -0,0 +1,11 @@ +#include "libft.h" + +int ft_isdigit(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if (a >= '0' && a <= '9') + return (a); + return (0); +} diff --git a/libftasm/ft_isprint.c b/libftasm/ft_isprint.c new file mode 100644 index 00000000..0dbed58e --- /dev/null +++ b/libftasm/ft_isprint.c @@ -0,0 +1,11 @@ +#include "libft.h" + +int ft_isprint(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if (a >= 32 && a <= 126) + return (a); + return (0); +} diff --git a/libftasm/ft_memccpy.c b/libftasm/ft_memccpy.c new file mode 100644 index 00000000..7db03485 --- /dev/null +++ b/libftasm/ft_memccpy.c @@ -0,0 +1,15 @@ +#include "libft.h" + +void *ft_memccpy(void *dst, const void *src, int c, size_t n) +{ + size_t i; + + i = -1; + while (++i < n) + { + *(char *)dst++ = *(char *)src; + if (*(char *)src++ == (unsigned char)c) + return (dst); + } + return (NULL); +} diff --git a/libftasm/ft_memchr.c b/libftasm/ft_memchr.c new file mode 100644 index 00000000..7b11d343 --- /dev/null +++ b/libftasm/ft_memchr.c @@ -0,0 +1,17 @@ +#include "libft.h" + +void *ft_memchr(const void *s, int c, size_t n) +{ + void *a; + size_t i; + + i = -1; + a = (unsigned char *)s; + while (++i < n) + { + if (*(unsigned char *)a == (unsigned char)c) + return (a); + a++; + } + return (NULL); +} diff --git a/libftasm/ft_memcmp.c b/libftasm/ft_memcmp.c new file mode 100644 index 00000000..e09ad1a5 --- /dev/null +++ b/libftasm/ft_memcmp.c @@ -0,0 +1,16 @@ +#include "libft.h" + +int ft_memcmp(const void *s1, const void *s2, size_t n) +{ + size_t i; + int cmp; + + i = 0; + while (++i < n) + { + cmp = ((unsigned char *)s1)[i] - ((unsigned char *)s2)[i]; + if (cmp) + return (cmp); + } + return (cmp); +} diff --git a/libftasm/ft_memcpy.c b/libftasm/ft_memcpy.c new file mode 100644 index 00000000..5e6f7428 --- /dev/null +++ b/libftasm/ft_memcpy.c @@ -0,0 +1,11 @@ +#include "libft.h" + +void *ft_memcpy(void *dst, const void *src, size_t n) +{ + size_t i; + + i = -1; + while (++i < n) + ((char *)dst)[i] = *(char *)src++; + return (dst); +} diff --git a/libftasm/ft_memmove.c b/libftasm/ft_memmove.c new file mode 100644 index 00000000..1d13ed2a --- /dev/null +++ b/libftasm/ft_memmove.c @@ -0,0 +1,14 @@ +#include "libft.h" + +void *ft_memmove(void *dst, const void *src, size_t len) +{ + size_t i; + + i = 0; + while (i < len && (dst + i < src || dst + i > src + len)) + { + ((char *)dst)[i] = ((char *)src)[i]; + i++; + } + return (dst); +} diff --git a/libftasm/ft_memset.c b/libftasm/ft_memset.c new file mode 100644 index 00000000..fdcf39af --- /dev/null +++ b/libftasm/ft_memset.c @@ -0,0 +1,11 @@ +#include "libft.h" + +void *ft_memset(void *b, int c, size_t len) +{ + size_t i; + + i = -1; + while (++i < len) + ((unsigned char *)b)[i] = (unsigned char)c; + return (b); +} diff --git a/libftasm/ft_strcat.c b/libftasm/ft_strcat.c new file mode 100644 index 00000000..b2947ea8 --- /dev/null +++ b/libftasm/ft_strcat.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:56:53 by jhalford #+# #+# */ +/* Updated: 2016/08/20 23:16:44 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +char *ft_strcat(char *s1, const char *s2) +{ + size_t size; + size_t j; + + size = ft_strlen(s1); + j = 0; + while (s2[j] != '\0') + { + s1[size + j] = s2[j]; + j++; + } + s1[size + j] = '\0'; + return (s1); +} diff --git a/libftasm/ft_strchr.c b/libftasm/ft_strchr.c new file mode 100644 index 00000000..8a034a10 --- /dev/null +++ b/libftasm/ft_strchr.c @@ -0,0 +1,17 @@ +#include "libft.h" + +char *strchr(const char *s, int c) +{ + char *a; + + a = (char *)s; + while (*a) + { + if (*a == (char)c) + return (a); + a++; + } + if (*a == (char)c) + return (a); + return (NULL); +} diff --git a/libftasm/ft_strcmp.c b/libftasm/ft_strcmp.c new file mode 100644 index 00000000..4ed571dc --- /dev/null +++ b/libftasm/ft_strcmp.c @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:49:02 by jhalford #+# #+# */ +/* Updated: 2016/08/25 17:06:34 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_strcmp(const char *s1, const char *s2) +{ + int cmp; + int i; + + i = 0; + while (1) + { + cmp = (s1[i] - s2[i]); + if (s1[i] == '\0' && s2[i] == '\0') + return (cmp); + if (s1[i] == s2[i]) + i++; + else + return (cmp); + } +} diff --git a/libftasm/ft_strcpy.c b/libftasm/ft_strcpy.c new file mode 100644 index 00000000..95818fff --- /dev/null +++ b/libftasm/ft_strcpy.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strcpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:48:12 by jhalford #+# #+# */ +/* Updated: 2016/08/20 23:37:18 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +char *ft_strcpy(char *dst, const char *src) +{ + int i; + + i = 0; + while (src[i] != '\0') + { + dst[i] = src[i]; + i++; + } + dst[i] = '\0'; + return (dst); +} diff --git a/libftasm/ft_strdup.c b/libftasm/ft_strdup.c new file mode 100644 index 00000000..5a2e196b --- /dev/null +++ b/libftasm/ft_strdup.c @@ -0,0 +1,19 @@ +#include "libft.h" + +char *ft_strdup(const char *s1) +{ + char *dup; + int size; + int i; + + i = 0; + size = ft_strlen(s1); + dup = (char*)malloc(sizeof(*dup) * (size + 1)); + while (s1[i] != '\0') + { + dup[i] = s1[i]; + i++; + } + dup[i] = '\0'; + return (dup); +} diff --git a/libftasm/ft_strlcat.c b/libftasm/ft_strlcat.c new file mode 100644 index 00000000..df94eea4 --- /dev/null +++ b/libftasm/ft_strlcat.c @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strlcat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:57:16 by jhalford #+# #+# */ +/* Updated: 2016/08/07 21:44:13 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +size_t ft_strlcat(char *dst, const char *src, size_t size) +{ + size_t i; + size_t dst_size; + size_t src_size; + + dst_size = ft_strlen(dst); + src_size = ft_strlen(src); + i = 0; + while (src[i] != '\0' && ((dst_size + i) < (size - 1))) + { + dst[dst_size + i] = src[i]; + i++; + } + dst[dst_size + i] = '\0'; + return (src_size + ((dst_size < size) ? dst_size : size)); +} diff --git a/libftasm/ft_strlen.c b/libftasm/ft_strlen.c new file mode 100644 index 00000000..000ad5ac --- /dev/null +++ b/libftasm/ft_strlen.c @@ -0,0 +1,11 @@ +#include "libft.h" + +size_t strlen(const char *s) +{ + int i; + + i = 0; + while (s[i]) + i++; + return (i); +} diff --git a/libftasm/ft_strncat.c b/libftasm/ft_strncat.c new file mode 100644 index 00000000..e5d7c040 --- /dev/null +++ b/libftasm/ft_strncat.c @@ -0,0 +1,29 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncat.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:57:07 by jhalford #+# #+# */ +/* Updated: 2016/08/07 10:57:11 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +char *ft_strncat(char *s1, const char *s2, size_t n) +{ + size_t size;; + size_t j; + + size = ft_strlen(s1); + j = 0; + while (s2[j] != '\0' && j < n) + { + s1[size + j] = s2[j]; + j++; + } + s1[size + j] = '\0'; + return (s1); +} diff --git a/libftasm/ft_strncmp.c b/libftasm/ft_strncmp.c new file mode 100644 index 00000000..cd7b8534 --- /dev/null +++ b/libftasm/ft_strncmp.c @@ -0,0 +1,33 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:49:12 by jhalford #+# #+# */ +/* Updated: 2016/08/15 22:25:07 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +int ft_strncmp(const char *s1, const char *s2, size_t n) +{ + int cmp; + size_t i; + + i = 0; + while (1) + { + cmp = (s1[i] - s2[i]); + if (i >= n - 1) + return (cmp); + if (s1[i] == '\0' && s2[i] == '\0') + return (cmp); + if (s1[i] == s2[i]) + i++; + else + return (cmp); + } +} diff --git a/libftasm/ft_strncpy.c b/libftasm/ft_strncpy.c new file mode 100644 index 00000000..85dd41c7 --- /dev/null +++ b/libftasm/ft_strncpy.c @@ -0,0 +1,31 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncpy.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:48:21 by jhalford #+# #+# */ +/* Updated: 2016/08/07 10:48:25 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +char *ft_strncpy(char *dst, const char *src, size_t len) +{ + size_t i; + + i = 0; + while (src[i] != '\0' && i < len) + { + dst[i] = src[i]; + i++; + } + while (i < len) + { + dst[i] = '\0'; + i++; + } + return (dst); +} diff --git a/libftasm/ft_strnstr.c b/libftasm/ft_strnstr.c new file mode 100644 index 00000000..554efb08 --- /dev/null +++ b/libftasm/ft_strnstr.c @@ -0,0 +1,23 @@ +#include "libft.h" + +char *ft_strnstr(const char *big, const char *little, size_t len) +{ + size_t i; + size_t j; + char *a; + + a = (char *)big; + i = 0; + while (a[i] != '\0' && i < len) + { + j = 0; + while (a[i + j] == little[j]) + { + j++; + if (little[j] == '\0') + return (a + i); + } + i++; + } + return (NULL); +} diff --git a/libftasm/ft_strrchr.c b/libftasm/ft_strrchr.c new file mode 100644 index 00000000..ec6b2801 --- /dev/null +++ b/libftasm/ft_strrchr.c @@ -0,0 +1,19 @@ +#include "libft.h" + +char *strrchr(const char *s, int c) +{ + char *a; + size_t i; + size_t len; + + a = (char *)s; + len = ft_strlen(a); + i = 0; + while (i <= len) + { + if (a[len - i] == (char)c) + return (a); + i++; + } + return (NULL); +} diff --git a/libftasm/ft_strstr.c b/libftasm/ft_strstr.c new file mode 100644 index 00000000..2fa6496c --- /dev/null +++ b/libftasm/ft_strstr.c @@ -0,0 +1,35 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strstr.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2016/08/07 10:48:35 by jhalford #+# #+# */ +/* Updated: 2016/08/09 13:53:17 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +char *ft_strstr(const char *big, const char *little) +{ + size_t i; + size_t j; + char *a; + + a = (char *)big; + i = 0; + while (a[i] != '\0') + { + j = 0; + while (a[i + j] == little[j]) + { + j++; + if (little[j] == '\0') + return (a + i); + } + i++; + } + return (0); +} diff --git a/libftasm/ft_tolower.c b/libftasm/ft_tolower.c new file mode 100644 index 00000000..dd6751c8 --- /dev/null +++ b/libftasm/ft_tolower.c @@ -0,0 +1,11 @@ +#include "libft.h" + +int ft_toupper(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if (a >= 'A' && a <= 'Z') + return (a + 32); + return (a); +} diff --git a/libftasm/ft_toupper.c b/libftasm/ft_toupper.c new file mode 100644 index 00000000..08720bb6 --- /dev/null +++ b/libftasm/ft_toupper.c @@ -0,0 +1,11 @@ +#include "libft.h" + +int ft_toupper(int c) +{ + unsigned char a; + + a = (unsigned char)c; + if (a >= 'a' && a <= 'z') + return (a - 32); + return (a); +} diff --git a/libftasm/libft.h b/libftasm/libft.h new file mode 100644 index 00000000..b7e4cc95 --- /dev/null +++ b/libftasm/libft.h @@ -0,0 +1,32 @@ +#include +#include +#include + +void *ft_memset(void *b, int c, size_t len); +void ft_bzero(void *s, size_t n); +void *ft_memcpy(void *dst, const void *src, size_t n); +void *ft_memccpy(void *dst, const void *src, int c, size_t n); +void *ft_memmove(void *dst, const void *src, size_t len); +void *ft_memchr(const void *s, int c, size_t n); +int ft_memcmp(const void *s1, const void *s2, size_t n); +size_t ft_strlen(const char *s); +char *ft_strdup(const char *s1); +char *ft_strcpy(char *dst, const char *src); +char *ft_strncpy(char *dst, const char *src, size_t len); +char *ft_strcat(char *s1, const char *s2); +char *ft_strncat(char *s1, const char *s2, size_t n); +size_t ft_strlcat(char *dst, const char *src, size_t size); +char *strchr(const char *s, int c); +char *strrchr(const char *s, int c); +char *ft_strstr(const char *big, const char *little); +char *ft_strnstr(const char *big, const char *little, size_t len); +int ft_strcmp(const char *s1, const char *s2); +int ft_strncmp(const char *s1, const char *s2, size_t n); +int ft_atoi(const char *str); +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); +int ft_toupper(int c); +int ft_tolower(int c);