42_solong/libftx/libft/ft_strlen.c
Camille Chauvet 975e0c2ef5 kekw
2023-01-05 19:04:29 +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);
}