commit 1d0f0b1901ab4556e229ee4fcda06724189c711d Author: Camille Chauvet Date: Tue Sep 27 16:29:23 2022 +0200 m diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2f03087 --- /dev/null +++ b/Makefile @@ -0,0 +1,64 @@ +# **************************************************************************** # +# # +# ::: :::::::: # +# Makefile :+: :+: :+: # +# +:+ +:+ +:+ # +# By: cchauvet = c && c >= '0') + || ('z' >= c && c >= 'a') + || ('Z' >= c && c >= 'A'))) + return (1); + return (0); +} diff --git a/ft_isalpha.c b/ft_isalpha.c new file mode 100644 index 0000000..9573931 --- /dev/null +++ b/ft_isalpha.c @@ -0,0 +1,20 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isalpha.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet = c && c >= 'a') || ('Z' >= c && c >= 'A')) + return (1); + return (0); +} diff --git a/ft_isascii.c b/ft_isascii.c new file mode 100644 index 0000000..5706106 --- /dev/null +++ b/ft_isascii.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isascii.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet = 0 && 127 >= c) + return (1); + return (0); +} diff --git a/ft_isdigit.c b/ft_isdigit.c new file mode 100644 index 0000000..0db99f6 --- /dev/null +++ b/ft_isdigit.c @@ -0,0 +1,20 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isdigit.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet = c && c >= '0') + return (1); + return (0); +} diff --git a/ft_isprint.c b/ft_isprint.c new file mode 100644 index 0000000..d16a74e --- /dev/null +++ b/ft_isprint.c @@ -0,0 +1,18 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_isprint.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet + +size_t ft_strlen(const char *s) +{ + size_t length; + + length = 0; + while (s[length]) + length++; + return (length); +} diff --git a/ft_strncmp.c b/ft_strncmp.c new file mode 100644 index 0000000..dc02068 --- /dev/null +++ b/ft_strncmp.c @@ -0,0 +1,23 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_strncmp.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet = 'A' && 'Z' >= c) + return (c - 48); + return (c); +} diff --git a/ft_toupper.c b/ft_toupper.c new file mode 100644 index 0000000..6fda229 --- /dev/null +++ b/ft_toupper.c @@ -0,0 +1,20 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_toupper.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet = 'a' && 'z' >= c) + return (c - 48); + return (c); +} diff --git a/libft.h b/libft.h new file mode 100644 index 0000000..9ae182c --- /dev/null +++ b/libft.h @@ -0,0 +1,41 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* libft.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet +# 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); +/* todo */ +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 *dst, const char *src, size_t size); +size_t ft_strlcat(char *dst, 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); +void *ft_memrchr(const void *s, int c, size_t n); +char *ft_strnstr(const char *big, const char *little, size_t len); +int ft_atoi(const char *nptr); + +#endif