base struct
This commit is contained in:
25
lib/libft/srcs/str/ft_strlen.c
Normal file
25
lib/libft/srcs/str/ft_strlen.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
||||
Reference in New Issue
Block a user