26 lines
1 KiB
C
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/01/18 18:04:47 by erey-bet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
size_t ft_strlen(const char *str)
|
|
{
|
|
int i;
|
|
|
|
if (str == NULL)
|
|
return (0);
|
|
i = 0;
|
|
while (str[i] != '\0')
|
|
i++;
|
|
return (i);
|
|
}
|