base c lib without external lib
This commit is contained in:
20
ft_strlen.c
Normal file
20
ft_strlen.c
Normal file
@@ -0,0 +1,20 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strlen.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/11/05 11:17:31 by dgaillet #+# #+# */
|
||||
/* Updated: 2025/11/05 11:20:00 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
size_t ft_strlen(const char *s)
|
||||
{
|
||||
if (!(*s))
|
||||
return (0);
|
||||
return (1 + ft_strlen(s + 1));
|
||||
}
|
||||
Reference in New Issue
Block a user