refactor: only the usefull header

- Removing all 'libft.h' mention
- Using the include only on the files needed by
This commit is contained in:
Raphael 2025-09-01 18:45:33 +02:00
parent afb804195a
commit 905ffd4b72
No known key found for this signature in database
48 changed files with 142 additions and 120 deletions

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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

View file

@ -10,7 +10,7 @@
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Check if the character is alpha

View file

@ -10,7 +10,7 @@
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Check if the character is in the ascii table

View file

@ -6,12 +6,10 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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
*

View file

@ -10,7 +10,7 @@
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Check if the character is printable

View file

@ -10,7 +10,7 @@
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief convert the upper case to lower case

View file

@ -10,7 +10,7 @@
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief convert the lower case to upper case

View file

@ -10,7 +10,7 @@
/* */
/* ************************************************************************** */
#include "libft.h"
static int ft_check_space(int c)
{

View file

@ -6,11 +6,11 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
static int ft_check_space(int c)
{

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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)
{

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Add the list new to the back of chained list of lst

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Add the list new to the front of chained list of lst

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Clear the element of the list with the function

View file

@ -6,14 +6,15 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @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

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Found the last element of the chained list

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Create an other list from an old one with a function on all element

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Allocate a new list with the first element

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Give the size of the chained list

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Sets a block of memory to zero

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Allocates and zeroes memory for an array

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Scans memory for a byte

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Compares two memory blocks

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Copies memory from source to destination

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
char *ft_checks(char *s, char *d, size_t n)
{

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Fills a block of memory with a specified byte

View file

@ -6,11 +6,14 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
void _print_char(int fd, char c, int *ret_value);
void _print_nbr(int fd, int nb, int *ret_value);

View file

@ -6,18 +6,13 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <limits.h>
#include <unistd.h>
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));
}

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief print an character on a file descriptor

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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

View file

@ -6,11 +6,13 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
static int ft_check_sign(int n, char *str, size_t *i, int fd)
{

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief print a string on a file descriptor

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
static int count_words(const char *str, char sep)
{

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Locates the first occurrence of a character in a string.

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Compares two strings lexicographically.

View file

@ -6,11 +6,11 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Copies a string.

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Duplicates a string.

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Applies a function to each character of a string.

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Joins two strings into a new string.

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
static size_t ft_strnlen(char *dest, size_t size)
{

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Copies a string with size limit.

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @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);

View file

@ -6,11 +6,13 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Applies a function to each character of a string.

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Compares two strings up to a specified number of characters.

View file

@ -6,11 +6,11 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Locates a substring within a string, up to a specified length.

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <unistd.h>
/**
* @brief Locates the last occurrence of a character in a string.

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Trims specified characters from the start and end of a string.

View file

@ -6,11 +6,12 @@
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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 <stdlib.h>
/**
* @brief Extracts a substring from a string.