/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_len.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: narnaud +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2021/10/18 16:04:47 by narnaud #+# #+# */ /* Updated: 2022/03/25 11:57:59 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ #include "../libft.h" size_t ft_strlen_to(const char *str, char ch) { size_t i; i = 0; while (str[i] && str[i] != ch) i++; return (i); } size_t ft_strlen(const char *str) { size_t i; i = 0; while (str[i] != '\0') i++; return (i); }