diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 15:00:17 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 15:00:17 +0100 |
commit | a3f3fc742daa4b28094b5ebe9be60263c41979d1 (patch) | |
tree | 5a6ce0fba04b55d6f4607038eeace0396e97f0e6 /libft/src | |
parent | commit, lotta stuff (diff) | |
download | 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.gz 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.bz2 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.xz 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.tar.zst 42-minishell-a3f3fc742daa4b28094b5ebe9be60263c41979d1.zip |
New libft, feelsgoodman
Diffstat (limited to '')
-rw-r--r-- | libft/src/ft_atoi.c (renamed from libft/ft_atoi.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_bzero.c (renamed from libft/ft_bzero.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_calloc.c (renamed from libft/ft_calloc.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_isalnum.c (renamed from libft/ft_isalnum.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_isalpha.c (renamed from libft/ft_isalpha.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_isascii.c (renamed from libft/ft_isascii.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_isdigit.c (renamed from libft/ft_isdigit.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_isprint.c (renamed from libft/ft_isprint.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_isspace.c (renamed from libft/ft_isspace_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_itoa.c (renamed from libft/ft_itoa.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstadd_back.c (renamed from libft/ft_lstadd_back_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstadd_front.c (renamed from libft/ft_lstadd_front_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstclear.c (renamed from libft/ft_lstclear_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstdelone.c (renamed from libft/ft_lstdelone_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstiter.c (renamed from libft/ft_lstiter_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstlast.c (renamed from libft/ft_lstlast_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstmap.c (renamed from libft/ft_lstmap_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstnew.c (renamed from libft/ft_lstnew_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_lstsize.c (renamed from libft/ft_lstsize_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_memccpy.c (renamed from libft/ft_memccpy.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_memchr.c (renamed from libft/ft_memchr.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_memcmp.c (renamed from libft/ft_memcmp.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_memcpy.c (renamed from libft/ft_memcpy.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_memmove.c (renamed from libft/ft_memmove.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_memset.c (renamed from libft/ft_memset.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putchar.c (renamed from libft/ft_putchar_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putchar_fd.c (renamed from libft/ft_putchar_fd.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putendl.c (renamed from libft/ft_putendl_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putendl_fd.c (renamed from libft/ft_putendl_fd.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putnbr.c (renamed from libft/ft_putnbr_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putnbr_fd.c (renamed from libft/ft_putnbr_fd.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putstr.c (renamed from libft/ft_putstr_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_putstr_fd.c (renamed from libft/ft_putstr_fd.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_split.c (renamed from libft/ft_split.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_sqrt.c (renamed from libft/ft_sqrt_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strcat.c (renamed from libft/ft_strcat_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strchr.c (renamed from libft/ft_strchr.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strcmp.c (renamed from libft/ft_strcmp_bonus.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strdup.c (renamed from libft/ft_strdup.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strjoin.c (renamed from libft/ft_strjoin.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strlcat.c (renamed from libft/ft_strlcat.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strlcpy.c (renamed from libft/ft_strlcpy.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strlen.c (renamed from libft/ft_strlen.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strmapi.c (renamed from libft/ft_strmapi.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strncmp.c (renamed from libft/ft_strncmp.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strnlen.c | 27 | ||||
-rw-r--r-- | libft/src/ft_strnstr.c (renamed from libft/ft_strnstr.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strrchr.c (renamed from libft/ft_strrchr.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_strtrim.c (renamed from libft/ft_strtrim.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_substr.c (renamed from libft/ft_substr.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_tolower.c (renamed from libft/ft_tolower.c) | 0 | ||||
-rw-r--r-- | libft/src/ft_toupper.c (renamed from libft/ft_toupper.c) | 0 |
52 files changed, 27 insertions, 0 deletions
diff --git a/libft/ft_atoi.c b/libft/src/ft_atoi.c index 8903606..8903606 100644 --- a/libft/ft_atoi.c +++ b/libft/src/ft_atoi.c diff --git a/libft/ft_bzero.c b/libft/src/ft_bzero.c index 05ff6b7..05ff6b7 100644 --- a/libft/ft_bzero.c +++ b/libft/src/ft_bzero.c diff --git a/libft/ft_calloc.c b/libft/src/ft_calloc.c index 49383da..49383da 100644 --- a/libft/ft_calloc.c +++ b/libft/src/ft_calloc.c diff --git a/libft/ft_isalnum.c b/libft/src/ft_isalnum.c index e9e1134..e9e1134 100644 --- a/libft/ft_isalnum.c +++ b/libft/src/ft_isalnum.c diff --git a/libft/ft_isalpha.c b/libft/src/ft_isalpha.c index 9e95bd6..9e95bd6 100644 --- a/libft/ft_isalpha.c +++ b/libft/src/ft_isalpha.c diff --git a/libft/ft_isascii.c b/libft/src/ft_isascii.c index 937ead5..937ead5 100644 --- a/libft/ft_isascii.c +++ b/libft/src/ft_isascii.c diff --git a/libft/ft_isdigit.c b/libft/src/ft_isdigit.c index 52ededc..52ededc 100644 --- a/libft/ft_isdigit.c +++ b/libft/src/ft_isdigit.c diff --git a/libft/ft_isprint.c b/libft/src/ft_isprint.c index d82ded0..d82ded0 100644 --- a/libft/ft_isprint.c +++ b/libft/src/ft_isprint.c diff --git a/libft/ft_isspace_bonus.c b/libft/src/ft_isspace.c index c9cf255..c9cf255 100644 --- a/libft/ft_isspace_bonus.c +++ b/libft/src/ft_isspace.c diff --git a/libft/ft_itoa.c b/libft/src/ft_itoa.c index bf3c0c8..bf3c0c8 100644 --- a/libft/ft_itoa.c +++ b/libft/src/ft_itoa.c diff --git a/libft/ft_lstadd_back_bonus.c b/libft/src/ft_lstadd_back.c index 58b3a72..58b3a72 100644 --- a/libft/ft_lstadd_back_bonus.c +++ b/libft/src/ft_lstadd_back.c diff --git a/libft/ft_lstadd_front_bonus.c b/libft/src/ft_lstadd_front.c index c9515ea..c9515ea 100644 --- a/libft/ft_lstadd_front_bonus.c +++ b/libft/src/ft_lstadd_front.c diff --git a/libft/ft_lstclear_bonus.c b/libft/src/ft_lstclear.c index 8d97b9c..8d97b9c 100644 --- a/libft/ft_lstclear_bonus.c +++ b/libft/src/ft_lstclear.c diff --git a/libft/ft_lstdelone_bonus.c b/libft/src/ft_lstdelone.c index 42a1da8..42a1da8 100644 --- a/libft/ft_lstdelone_bonus.c +++ b/libft/src/ft_lstdelone.c diff --git a/libft/ft_lstiter_bonus.c b/libft/src/ft_lstiter.c index 3129ab5..3129ab5 100644 --- a/libft/ft_lstiter_bonus.c +++ b/libft/src/ft_lstiter.c diff --git a/libft/ft_lstlast_bonus.c b/libft/src/ft_lstlast.c index a685322..a685322 100644 --- a/libft/ft_lstlast_bonus.c +++ b/libft/src/ft_lstlast.c diff --git a/libft/ft_lstmap_bonus.c b/libft/src/ft_lstmap.c index 474b1bc..474b1bc 100644 --- a/libft/ft_lstmap_bonus.c +++ b/libft/src/ft_lstmap.c diff --git a/libft/ft_lstnew_bonus.c b/libft/src/ft_lstnew.c index a5e1c0a..a5e1c0a 100644 --- a/libft/ft_lstnew_bonus.c +++ b/libft/src/ft_lstnew.c diff --git a/libft/ft_lstsize_bonus.c b/libft/src/ft_lstsize.c index 1742a5f..1742a5f 100644 --- a/libft/ft_lstsize_bonus.c +++ b/libft/src/ft_lstsize.c diff --git a/libft/ft_memccpy.c b/libft/src/ft_memccpy.c index a029e7d..a029e7d 100644 --- a/libft/ft_memccpy.c +++ b/libft/src/ft_memccpy.c diff --git a/libft/ft_memchr.c b/libft/src/ft_memchr.c index c2578aa..c2578aa 100644 --- a/libft/ft_memchr.c +++ b/libft/src/ft_memchr.c diff --git a/libft/ft_memcmp.c b/libft/src/ft_memcmp.c index 59a99bd..59a99bd 100644 --- a/libft/ft_memcmp.c +++ b/libft/src/ft_memcmp.c diff --git a/libft/ft_memcpy.c b/libft/src/ft_memcpy.c index 548ea95..548ea95 100644 --- a/libft/ft_memcpy.c +++ b/libft/src/ft_memcpy.c diff --git a/libft/ft_memmove.c b/libft/src/ft_memmove.c index 000a2b7..000a2b7 100644 --- a/libft/ft_memmove.c +++ b/libft/src/ft_memmove.c diff --git a/libft/ft_memset.c b/libft/src/ft_memset.c index b94c6fa..b94c6fa 100644 --- a/libft/ft_memset.c +++ b/libft/src/ft_memset.c diff --git a/libft/ft_putchar_bonus.c b/libft/src/ft_putchar.c index b558ead..b558ead 100644 --- a/libft/ft_putchar_bonus.c +++ b/libft/src/ft_putchar.c diff --git a/libft/ft_putchar_fd.c b/libft/src/ft_putchar_fd.c index f57a4f9..f57a4f9 100644 --- a/libft/ft_putchar_fd.c +++ b/libft/src/ft_putchar_fd.c diff --git a/libft/ft_putendl_bonus.c b/libft/src/ft_putendl.c index 26dc80b..26dc80b 100644 --- a/libft/ft_putendl_bonus.c +++ b/libft/src/ft_putendl.c diff --git a/libft/ft_putendl_fd.c b/libft/src/ft_putendl_fd.c index 39fe7c1..39fe7c1 100644 --- a/libft/ft_putendl_fd.c +++ b/libft/src/ft_putendl_fd.c diff --git a/libft/ft_putnbr_bonus.c b/libft/src/ft_putnbr.c index 5220151..5220151 100644 --- a/libft/ft_putnbr_bonus.c +++ b/libft/src/ft_putnbr.c diff --git a/libft/ft_putnbr_fd.c b/libft/src/ft_putnbr_fd.c index b240f43..b240f43 100644 --- a/libft/ft_putnbr_fd.c +++ b/libft/src/ft_putnbr_fd.c diff --git a/libft/ft_putstr_bonus.c b/libft/src/ft_putstr.c index d29a940..d29a940 100644 --- a/libft/ft_putstr_bonus.c +++ b/libft/src/ft_putstr.c diff --git a/libft/ft_putstr_fd.c b/libft/src/ft_putstr_fd.c index b90c078..b90c078 100644 --- a/libft/ft_putstr_fd.c +++ b/libft/src/ft_putstr_fd.c diff --git a/libft/ft_split.c b/libft/src/ft_split.c index 7c706cf..7c706cf 100644 --- a/libft/ft_split.c +++ b/libft/src/ft_split.c diff --git a/libft/ft_sqrt_bonus.c b/libft/src/ft_sqrt.c index 3003e6d..3003e6d 100644 --- a/libft/ft_sqrt_bonus.c +++ b/libft/src/ft_sqrt.c diff --git a/libft/ft_strcat_bonus.c b/libft/src/ft_strcat.c index 59084c2..59084c2 100644 --- a/libft/ft_strcat_bonus.c +++ b/libft/src/ft_strcat.c diff --git a/libft/ft_strchr.c b/libft/src/ft_strchr.c index 86bd41d..86bd41d 100644 --- a/libft/ft_strchr.c +++ b/libft/src/ft_strchr.c diff --git a/libft/ft_strcmp_bonus.c b/libft/src/ft_strcmp.c index 2e9ffe9..2e9ffe9 100644 --- a/libft/ft_strcmp_bonus.c +++ b/libft/src/ft_strcmp.c diff --git a/libft/ft_strdup.c b/libft/src/ft_strdup.c index ce74fb5..ce74fb5 100644 --- a/libft/ft_strdup.c +++ b/libft/src/ft_strdup.c diff --git a/libft/ft_strjoin.c b/libft/src/ft_strjoin.c index f666781..f666781 100644 --- a/libft/ft_strjoin.c +++ b/libft/src/ft_strjoin.c diff --git a/libft/ft_strlcat.c b/libft/src/ft_strlcat.c index 98fa3e8..98fa3e8 100644 --- a/libft/ft_strlcat.c +++ b/libft/src/ft_strlcat.c diff --git a/libft/ft_strlcpy.c b/libft/src/ft_strlcpy.c index bba4263..bba4263 100644 --- a/libft/ft_strlcpy.c +++ b/libft/src/ft_strlcpy.c diff --git a/libft/ft_strlen.c b/libft/src/ft_strlen.c index 68c7614..68c7614 100644 --- a/libft/ft_strlen.c +++ b/libft/src/ft_strlen.c diff --git a/libft/ft_strmapi.c b/libft/src/ft_strmapi.c index 7a38ca9..7a38ca9 100644 --- a/libft/ft_strmapi.c +++ b/libft/src/ft_strmapi.c diff --git a/libft/ft_strncmp.c b/libft/src/ft_strncmp.c index c8a0b87..c8a0b87 100644 --- a/libft/ft_strncmp.c +++ b/libft/src/ft_strncmp.c diff --git a/libft/src/ft_strnlen.c b/libft/src/ft_strnlen.c new file mode 100644 index 0000000..88bd437 --- /dev/null +++ b/libft/src/ft_strnlen.c @@ -0,0 +1,27 @@ +/* ************************************************************************** */ +/* LE - / */ +/* / */ +/* ft_strnlen.c .:: .:/ . .:: */ +/* +:+:+ +: +: +:+:+ */ +/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */ +/* #+# #+ #+ #+# */ +/* Created: 2019/10/30 14:28:01 by rbousset #+# ## ## #+# */ +/* Updated: 2019/10/30 14:28:03 by rbousset ### #+. /#+ ###.fr */ +/* / */ +/* / */ +/* ************************************************************************** */ + +#include <stddef.h> + +size_t + ft_strlen_size(const char *s, size_t size) +{ + const char *ptr = s; + + while (size > 0 && *ptr) + { + size--; + ptr++; + } + return (ptr - s); +} diff --git a/libft/ft_strnstr.c b/libft/src/ft_strnstr.c index 583026e..583026e 100644 --- a/libft/ft_strnstr.c +++ b/libft/src/ft_strnstr.c diff --git a/libft/ft_strrchr.c b/libft/src/ft_strrchr.c index 47ba95b..47ba95b 100644 --- a/libft/ft_strrchr.c +++ b/libft/src/ft_strrchr.c diff --git a/libft/ft_strtrim.c b/libft/src/ft_strtrim.c index c691815..c691815 100644 --- a/libft/ft_strtrim.c +++ b/libft/src/ft_strtrim.c diff --git a/libft/ft_substr.c b/libft/src/ft_substr.c index 87c2568..87c2568 100644 --- a/libft/ft_substr.c +++ b/libft/src/ft_substr.c diff --git a/libft/ft_tolower.c b/libft/src/ft_tolower.c index 48c065e..48c065e 100644 --- a/libft/ft_tolower.c +++ b/libft/src/ft_tolower.c diff --git a/libft/ft_toupper.c b/libft/src/ft_toupper.c index 3346cc3..3346cc3 100644 --- a/libft/ft_toupper.c +++ b/libft/src/ft_toupper.c |