c_basic_exo/ex7/ft_strlen.c

29 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sgongas <sgongas@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/22 23:13:42 by sgongas #+# #+# */
/* Updated: 2026/02/22 23:15:58 by sgongas ### ########.fr */
/* */
/* ************************************************************************** */
int ft_strlen(char *str)
{
int i;
i = 0;
while (str[i])
i++;
return (i);
}
// #include <stdio.h>
// int main(void)
// {
// printf("%d", ft_strlen("1234567890"));
// return (0);
// }