42_minishell/libftx/printf/ft_strlen.c
Camille Chauvet 5a102e93a1 init
2023-01-31 14:40:15 +01:00

26 lines
1.0 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/10/06 17:39:05 by cchauvet #+# #+# */
/* Updated: 2022/10/11 00:01:22 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_printf.h"
size_t ft_strlen(const char *s)
{
size_t i;
if (s == NULL)
return (0);
i = 0;
while (s[i])
i++;
return (i);
}