42_solong/libftx/printf/ft_strlen.c
Camille Chauvet 9e58abcd5c kekw
2022-12-22 17:54:17 +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);
}