ft_strlen.c

This commit is contained in:
Timo Schmidt 2023-03-19 05:21:50 +01:00
parent 8056af83db
commit 5d07bdd66c
1 changed files with 31 additions and 0 deletions

31
ex06/ft_strlen.c Normal file
View File

@ -0,0 +1,31 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tischmid <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/19 04:52:42 by tischmid #+# #+# */
/* Updated: 2023/03/19 05:08:06 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"));
return (0);
}
*/ ////