1
0
libft_new/str/ft_strlen.c

27 lines
1016 B
C
Raw Normal View History

2023-11-03 16:21:15 +01:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlen.c :+: :+: :+: */
/* +:+ +:+ +:+ */
2024-02-04 15:11:02 +01:00
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
2023-11-03 16:21:15 +01:00
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/30 18:15:57 by adjoly #+# #+# */
2024-02-04 15:11:02 +01:00
/* Updated: 2024/02/04 15:10:15 by adjoly ### ########.fr */
2023-11-03 16:21:15 +01:00
/* */
/* ************************************************************************** */
2024-02-04 15:11:02 +01:00
#include "../libft.h"
2023-11-03 16:21:15 +01:00
size_t ft_strlen(const char *s)
{
2024-02-04 15:11:02 +01:00
size_t i;
2023-11-03 16:21:15 +01:00
i = 0;
2024-02-04 15:11:02 +01:00
while (*s)
{
s++;
2023-11-03 16:21:15 +01:00
i++;
2024-02-04 15:11:02 +01:00
}
2023-11-03 16:21:15 +01:00
return (i);
}