42_minishell/libftx/libft/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/09/26 12:03:59 by cchauvet #+# #+# */
/* Updated: 2023/01/05 17:46:12 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlen(const char *s)
{
size_t length;
if (s == NULL)
return (0);
length = 0;
while (s[length])
length++;
return (length);
}