GNL now using libft functions
This commit is contained in:
@@ -3,49 +3,15 @@
|
||||
/* ::: :::::::: */
|
||||
/* get_next_line_utils.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com> +#+ +:+ +#+ */
|
||||
/* By: aortigos <aortigos@student.42malaga.com +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/03/15 18:37:57 by aortigos #+# #+# */
|
||||
/* Updated: 2024/03/15 18:56:09 by aortigos ### ########.fr */
|
||||
/* Updated: 2025/11/16 20:33:54 by aortigos ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "get_next_line.h"
|
||||
|
||||
size_t ft_strlen(char *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
if (!s)
|
||||
return (0);
|
||||
while (s[i] != '\0')
|
||||
{
|
||||
i++;
|
||||
}
|
||||
return (i);
|
||||
}
|
||||
|
||||
char *ft_strchr(char *s, int c)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
if (!s)
|
||||
return (0);
|
||||
if (c == '\0')
|
||||
return ((char *)&s[ft_strlen(s)]);
|
||||
while (s[i] != '\0')
|
||||
{
|
||||
if (s[i] == (char) c)
|
||||
{
|
||||
return ((char *)&s[i]);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
char *ft_strjoin(char *left_str, char *buff)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
Reference in New Issue
Block a user