philosopher/utils/ft_strlen.c
Etienne Rey-bethbeder 2323578207 Ajout
2023-03-12 18:02:00 +01:00

26 lines
1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erey-bet <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/15 11:46:17 by erey-bet #+# #+# */
/* Updated: 2023/03/08 21:14:06 by erey-bet ### ########.fr */
/* */
/* ************************************************************************** */
#include "utils.h"
int ft_strlen(const char *str)
{
int i;
if (str == NULL)
return (0);
i = 0;
while (str[i] != '\0')
i++;
return (i);
}