26 lines
1.0 KiB
C
26 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strlen.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: nalebrun <nalebrun@student.s19.be> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/10/10 12:01:43 by nalebrun #+# #+# */
|
|
/* Updated: 2024/11/25 16:16:24 by nalebrun ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "../../libft.h"
|
|
|
|
size_t ft_strlen(const char *s)
|
|
{
|
|
size_t i;
|
|
|
|
if (!s)
|
|
return (0);
|
|
i = 0;
|
|
while (s[i] != 0)
|
|
i++;
|
|
return (i);
|
|
}
|