42_C_PISCINE/C/c01/ex06/ft_strlen.c

26 lines
1011 B
C
Raw Normal View History

2023-05-17 12:45:25 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/14 19:06:11 by cchauvet #+# #+# */
/* Updated: 2022/07/15 12:03:56 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include <unistd.h>
int ft_strlen(char *str)
{
int a;
a = 0;
while (*str != 0)
{
a++;
str++;
}
return(a);
}