1
0
libft_new/str/ft_strlen.c

24 lines
1022 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-03-14 16:19:34 +01:00
/* Updated: 2024/03/12 15:07:08 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-03-14 16:19:34 +01:00
const char *tmp;
2023-11-03 16:21:15 +01:00
2024-03-14 16:19:34 +01:00
tmp = s;
while (*tmp)
tmp++;
return (tmp - s);
2023-11-03 16:21:15 +01:00
}