ft_strlen: initial implementation
also create libft.h
This commit is contained in:
parent
3001be14f1
commit
66f4981649
3 changed files with 52 additions and 2 deletions
23
ft_strlen.c
Normal file
23
ft_strlen.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strlen.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/14 15:12:02 by kcolin #+# #+# */
|
||||
/* Updated: 2024/10/15 10:17:25 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
t_size ft_strlen(const char *s)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (s[i] != '\0')
|
||||
i++;
|
||||
return (i);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue