piscine-c01/ex06/ft_strlen.c

32 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 04:52:42 by tischmid #+# #+# */
/* Updated: 2023/03/19 06:12:09 by tischmid ### ########.fr */
/* */
/* ************************************************************************** */
int ft_strlen(char *str)
{
int i;
i = 0;
while (str[i] != '\0')
++i;
return (i);
}
/* ////
#include <stdio.h>
int main(void)
{
printf("%d\n", ft_strlen("HELLO WORLD"));
return (0);
}
*/ ////