42_minitalk/libftx/libft/ft_strlen.c

26 lines
1.0 KiB
C
Raw Permalink Normal View History

2023-01-23 07:22:30 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* 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);
}