diff --git a/char/ft_isalnum.c b/char/ft_isalnum.c index 6898862..5f636ff 100644 --- a/char/ft_isalnum.c +++ b/char/ft_isalnum.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/06 12:47:28 by rparodi #+# #+# */ -/* Updated: 2024/10/31 12:54:42 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 18:31:27 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "char.h" /** * @brief Check if the character is alpha-numeric diff --git a/char/ft_isalpha.c b/char/ft_isalpha.c index 8f93d59..f5dd4ba 100644 --- a/char/ft_isalpha.c +++ b/char/ft_isalpha.c @@ -10,7 +10,7 @@ /* */ /* ************************************************************************** */ -#include "libft.h" + /** * @brief Check if the character is alpha diff --git a/char/ft_isascii.c b/char/ft_isascii.c index 942e780..953b871 100644 --- a/char/ft_isascii.c +++ b/char/ft_isascii.c @@ -10,7 +10,7 @@ /* */ /* ************************************************************************** */ -#include "libft.h" + /** * @brief Check if the character is in the ascii table diff --git a/char/ft_isdigit.c b/char/ft_isdigit.c index ac3315e..6876a6d 100644 --- a/char/ft_isdigit.c +++ b/char/ft_isdigit.c @@ -6,12 +6,10 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/06 12:44:28 by rparodi #+# #+# */ -/* Updated: 2024/10/31 12:49:05 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:25:14 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" - /** * @brief Check if the character is alpha numeric * diff --git a/char/ft_isprint.c b/char/ft_isprint.c index d77c82a..2e0f350 100644 --- a/char/ft_isprint.c +++ b/char/ft_isprint.c @@ -10,7 +10,7 @@ /* */ /* ************************************************************************** */ -#include "libft.h" + /** * @brief Check if the character is printable diff --git a/char/ft_tolower.c b/char/ft_tolower.c index 5130815..caa76d2 100644 --- a/char/ft_tolower.c +++ b/char/ft_tolower.c @@ -10,7 +10,7 @@ /* */ /* ************************************************************************** */ -#include "libft.h" + /** * @brief convert the upper case to lower case diff --git a/char/ft_toupper.c b/char/ft_toupper.c index d3c01b4..dcf91df 100644 --- a/char/ft_toupper.c +++ b/char/ft_toupper.c @@ -10,7 +10,7 @@ /* */ /* ************************************************************************** */ -#include "libft.h" + /** * @brief convert the lower case to upper case diff --git a/convert/ft_atoi.c b/convert/ft_atoi.c index d4830ec..bffd529 100644 --- a/convert/ft_atoi.c +++ b/convert/ft_atoi.c @@ -10,7 +10,7 @@ /* */ /* ************************************************************************** */ -#include "libft.h" + static int ft_check_space(int c) { diff --git a/convert/ft_atoll.c b/convert/ft_atoll.c index 414010e..69ae348 100644 --- a/convert/ft_atoll.c +++ b/convert/ft_atoll.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/31 15:12:07 by rparodi #+# #+# */ -/* Updated: 2024/10/31 15:14:50 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:32:11 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include static int ft_check_space(int c) { diff --git a/convert/ft_itoa.c b/convert/ft_itoa.c index 6104fe3..f25351a 100644 --- a/convert/ft_itoa.c +++ b/convert/ft_itoa.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:56:30 by rparodi #+# #+# */ -/* Updated: 2024/10/31 13:02:55 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:30:01 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include "memory.h" static size_t ft_check_sign(char *str, long *nb) { diff --git a/list/ft_lstadd_back.c b/list/ft_lstadd_back.c index 344a851..03da61e 100644 --- a/list/ft_lstadd_back.c +++ b/list/ft_lstadd_back.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:39:56 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:29:37 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:35:17 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Add the list new to the back of chained list of lst diff --git a/list/ft_lstadd_front.c b/list/ft_lstadd_front.c index 42dcf9a..aad3a53 100644 --- a/list/ft_lstadd_front.c +++ b/list/ft_lstadd_front.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:40:16 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:30:01 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:35:45 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Add the list new to the front of chained list of lst diff --git a/list/ft_lstclear.c b/list/ft_lstclear.c index 4a34087..77e0359 100644 --- a/list/ft_lstclear.c +++ b/list/ft_lstclear.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:40:37 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:32:23 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:33:31 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" /** * @brief Clear the all list with the function diff --git a/list/ft_lstdelone.c b/list/ft_lstdelone.c index 21cc2dd..7948114 100644 --- a/list/ft_lstdelone.c +++ b/list/ft_lstdelone.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:42:11 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:46:00 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:36:07 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Clear the element of the list with the function diff --git a/list/ft_lstiter.c b/list/ft_lstiter.c index 717f8a5..0fb98c5 100644 --- a/list/ft_lstiter.c +++ b/list/ft_lstiter.c @@ -6,14 +6,15 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:42:24 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:46:55 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:35:17 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** - * @brief Apply the function given in arguments at all the element of the list + * @brief Apply the fstunction given in arguments at all the element of the list * * @param lst the chained list * @param f the pointer to function diff --git a/list/ft_lstlast.c b/list/ft_lstlast.c index 4d64a7b..b6e6a56 100644 --- a/list/ft_lstlast.c +++ b/list/ft_lstlast.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:42:54 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:48:08 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:36:47 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Found the last element of the chained list diff --git a/list/ft_lstmap.c b/list/ft_lstmap.c index d1c505c..0299b5d 100644 --- a/list/ft_lstmap.c +++ b/list/ft_lstmap.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:43:28 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:51:38 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:37:46 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Create an other list from an old one with a function on all element diff --git a/list/ft_lstnew.c b/list/ft_lstnew.c index 816fea4..bdef868 100644 --- a/list/ft_lstnew.c +++ b/list/ft_lstnew.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:44:02 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:52:24 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:39:00 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Allocate a new list with the first element diff --git a/list/ft_lstsize.c b/list/ft_lstsize.c index fffaf49..e58fe3f 100644 --- a/list/ft_lstsize.c +++ b/list/ft_lstsize.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/12 11:44:24 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:53:11 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:39:28 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "list.h" +#include /** * @brief Give the size of the chained list diff --git a/memory/ft_bzero.c b/memory/ft_bzero.c index 2492e03..732ea50 100644 --- a/memory/ft_bzero.c +++ b/memory/ft_bzero.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:43:13 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:54:25 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:39:50 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "memory.h" +#include /** * @brief Sets a block of memory to zero diff --git a/memory/ft_calloc.c b/memory/ft_calloc.c index db1e5d0..3f7583f 100644 --- a/memory/ft_calloc.c +++ b/memory/ft_calloc.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:47:17 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:55:30 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 18:28:34 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "memory.h" +#include /** * @brief Allocates and zeroes memory for an array diff --git a/memory/ft_memchr.c b/memory/ft_memchr.c index 6dd568d..1d8bb75 100644 --- a/memory/ft_memchr.c +++ b/memory/ft_memchr.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:48:30 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:59:07 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:40:36 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "memory.h" +#include /** * @brief Scans memory for a byte diff --git a/memory/ft_memcmp.c b/memory/ft_memcmp.c index 3b88c68..7c3d955 100644 --- a/memory/ft_memcmp.c +++ b/memory/ft_memcmp.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:49:04 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:59:48 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:40:58 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Compares two memory blocks diff --git a/memory/ft_memcpy.c b/memory/ft_memcpy.c index 4da7a37..4c35af1 100644 --- a/memory/ft_memcpy.c +++ b/memory/ft_memcpy.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:49:46 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:57:31 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:41:32 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Copies memory from source to destination diff --git a/memory/ft_memmove.c b/memory/ft_memmove.c index 96037b0..eafef17 100644 --- a/memory/ft_memmove.c +++ b/memory/ft_memmove.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:51:35 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:15:19 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:41:47 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include char *ft_checks(char *s, char *d, size_t n) { diff --git a/memory/ft_memset.c b/memory/ft_memset.c index f88525f..e4825d6 100644 --- a/memory/ft_memset.c +++ b/memory/ft_memset.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:50:29 by rparodi #+# #+# */ -/* Updated: 2024/10/31 17:56:59 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 16:42:01 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Fills a block of memory with a specified byte diff --git a/print/ft_printf.c b/print/ft_printf.c index fa158ed..a051a98 100644 --- a/print/ft_printf.c +++ b/print/ft_printf.c @@ -6,11 +6,14 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/14 17:27:44 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:01:28 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:58:00 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include +#include +#include void _print_char(int fd, char c, int *ret_value); void _print_nbr(int fd, int nb, int *ret_value); diff --git a/print/ft_put.c b/print/ft_put.c index 840aa6a..661f0e8 100644 --- a/print/ft_put.c +++ b/print/ft_put.c @@ -6,18 +6,13 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/16 12:13:14 by rparodi #+# #+# */ -/* Updated: 2024/10/31 16:16:45 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:57:36 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" - -void _print_char(int fd, char c, int *ret_value); -void _print_nbr(int fd, int nb, int *ret_value); -void _print_base(\ - int fd, unsigned long long nbr, int *ret_value, char c); -void _print_unsigned(int fd, unsigned int nb, int *ret_value); -void _print_str(int fd, char *str, int *ret_value); +#include "str.h" +#include +#include void _print_char(int fd, char c, int *ret_value) { @@ -25,6 +20,25 @@ void _print_char(int fd, char c, int *ret_value) (*ret_value)++; } +void _print_unsigned(int fd, unsigned int nb, int *ret_value) +{ + if (nb >= 10) + { + _print_unsigned(fd, nb / 10, ret_value); + nb = nb % 10; + } + if (nb < 10) + _print_char(fd, nb + 48, ret_value); +} + +void _print_str(int fd, char *str, int *ret_value) +{ + if (!str) + *ret_value += write(fd, "(null)", 6); + else + *ret_value += write(fd, str, ft_strlen(str)); +} + void _print_nbr(int fd, int nb, int *ret_value) { if (nb < 0) @@ -36,8 +50,7 @@ void _print_nbr(int fd, int nb, int *ret_value) return ; } nb = -nb; - _print_char(fd, '-', ret_value); - } + _print_char(fd, '-', ret_value); } if (nb >= 10) { _print_nbr(fd, nb / 10, ret_value); @@ -76,22 +89,3 @@ void _print_base(\ _print_char(fd, base[nbr % 16], ret_value); } } - -void _print_unsigned(int fd, unsigned int nb, int *ret_value) -{ - if (nb >= 10) - { - _print_unsigned(fd, nb / 10, ret_value); - nb = nb % 10; - } - if (nb < 10) - _print_char(fd, nb + 48, ret_value); -} - -void _print_str(int fd, char *str, int *ret_value) -{ - if (!str) - *ret_value += write(fd, "(null)", 6); - else - *ret_value += write(fd, str, ft_strlen(str)); -} diff --git a/print/ft_putchar_fd.c b/print/ft_putchar_fd.c index 592a3a6..0bb8f44 100644 --- a/print/ft_putchar_fd.c +++ b/print/ft_putchar_fd.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:58:22 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:02:37 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:46:44 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief print an character on a file descriptor diff --git a/print/ft_putendl_fd.c b/print/ft_putendl_fd.c index 8d53376..734c2b1 100644 --- a/print/ft_putendl_fd.c +++ b/print/ft_putendl_fd.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:59:01 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:03:47 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:46:30 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "print.h" /** * @brief Print a string follow by a new line on a file descriptor diff --git a/print/ft_putnbr_fd.c b/print/ft_putnbr_fd.c index 17aeedf..220824f 100644 --- a/print/ft_putnbr_fd.c +++ b/print/ft_putnbr_fd.c @@ -6,11 +6,13 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:59:18 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:04:17 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:47:41 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "print.h" +#include "memory.h" +#include static int ft_check_sign(int n, char *str, size_t *i, int fd) { diff --git a/print/ft_putstr_fd.c b/print/ft_putstr_fd.c index 70a3bc9..3a0782f 100644 --- a/print/ft_putstr_fd.c +++ b/print/ft_putstr_fd.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:58:46 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:05:11 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:48:07 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief print a string on a file descriptor diff --git a/str/ft_split.c b/str/ft_split.c index 95f71df..ad124d3 100644 --- a/str/ft_split.c +++ b/str/ft_split.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:56:02 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:13:39 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:49:19 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include static int count_words(const char *str, char sep) { diff --git a/str/ft_strchr.c b/str/ft_strchr.c index 82ee8bd..472841e 100644 --- a/str/ft_strchr.c +++ b/str/ft_strchr.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:32:19 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:13:01 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:49:27 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Locates the first occurrence of a character in a string. diff --git a/str/ft_strcmp.c b/str/ft_strcmp.c index 08ad900..6ef1976 100644 --- a/str/ft_strcmp.c +++ b/str/ft_strcmp.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:56:56 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:07:20 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:50:06 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Compares two strings lexicographically. diff --git a/str/ft_strcpy.c b/str/ft_strcpy.c index 756166a..36eae2a 100644 --- a/str/ft_strcpy.c +++ b/str/ft_strcpy.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/10/31 16:14:10 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:14:03 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:36:18 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Copies a string. diff --git a/str/ft_strdup.c b/str/ft_strdup.c index 15a229a..0a1a8c6 100644 --- a/str/ft_strdup.c +++ b/str/ft_strdup.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:53:59 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:14:44 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:58:58 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Duplicates a string. diff --git a/str/ft_striteri.c b/str/ft_striteri.c index 581d59a..3a88652 100644 --- a/str/ft_striteri.c +++ b/str/ft_striteri.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:57:34 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:11:04 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:50:26 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Applies a function to each character of a string. diff --git a/str/ft_strjoin.c b/str/ft_strjoin.c index 8b353b0..ca95a58 100644 --- a/str/ft_strjoin.c +++ b/str/ft_strjoin.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:55:15 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:13:21 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:58:58 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Joins two strings into a new string. diff --git a/str/ft_strlcat.c b/str/ft_strlcat.c index 2dde695..f8bbf79 100644 --- a/str/ft_strlcat.c +++ b/str/ft_strlcat.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/08 22:28:26 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:10:19 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:52:29 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include static size_t ft_strnlen(char *dest, size_t size) { diff --git a/str/ft_strlcpy.c b/str/ft_strlcpy.c index 1d089fa..86bd60a 100644 --- a/str/ft_strlcpy.c +++ b/str/ft_strlcpy.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:55:25 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:12:13 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:52:00 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Copies a string with size limit. diff --git a/str/ft_strlen.c b/str/ft_strlen.c index 4c0e9a7..a6db9cf 100644 --- a/str/ft_strlen.c +++ b/str/ft_strlen.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:56:24 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:12:19 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 18:34:21 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Computes the length of a string. @@ -24,6 +24,8 @@ size_t ft_strlen(const char *s) size_t i; i = 0; + if (!s) + return (0); while (s[i] != '\0') i++; return (i); diff --git a/str/ft_strmapi.c b/str/ft_strmapi.c index 691df40..4a2c463 100644 --- a/str/ft_strmapi.c +++ b/str/ft_strmapi.c @@ -6,11 +6,13 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:56:57 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:14:29 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 18:28:51 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "memory.h" +#include "str.h" +#include /** * @brief Applies a function to each character of a string. diff --git a/str/ft_strncmp.c b/str/ft_strncmp.c index 714b572..78933d5 100644 --- a/str/ft_strncmp.c +++ b/str/ft_strncmp.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:56:56 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:13:58 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:54:01 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Compares two strings up to a specified number of characters. diff --git a/str/ft_strnstr.c b/str/ft_strnstr.c index b5061fa..8949913 100644 --- a/str/ft_strnstr.c +++ b/str/ft_strnstr.c @@ -6,11 +6,11 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:57:44 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:12:05 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:54:58 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include /** * @brief Locates a substring within a string, up to a specified length. diff --git a/str/ft_strrchr.c b/str/ft_strrchr.c index 5d06ac9..b53358e 100644 --- a/str/ft_strrchr.c +++ b/str/ft_strrchr.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:58:22 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:13:53 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 17:49:39 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Locates the last occurrence of a character in a string. diff --git a/str/ft_strtrim.c b/str/ft_strtrim.c index 8a1b364..b5ccf5e 100644 --- a/str/ft_strtrim.c +++ b/str/ft_strtrim.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:55:44 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:09:25 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 18:26:20 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Trims specified characters from the start and end of a string. diff --git a/str/ft_substr.c b/str/ft_substr.c index 7129bdf..8c1aecc 100644 --- a/str/ft_substr.c +++ b/str/ft_substr.c @@ -6,11 +6,12 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/09 13:54:42 by rparodi #+# #+# */ -/* Updated: 2024/10/31 18:10:59 by rparodi ### ########.fr */ +/* Updated: 2025/09/01 18:26:29 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ -#include "libft.h" +#include "str.h" +#include /** * @brief Extracts a substring from a string.