/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strlen.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2023/11/07 16:56:24 by rparodi #+# #+# */ /* Updated: 2024/04/22 10:35:54 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ #include "../includes/push_swap.h" size_t chk_len(const char *str) { size_t i; if (str[0] == '-') i = 1; else i = 0; while (str[i] != '\0' && (str[i] == '0')) i++; return (ft_len(str + i)); } size_t ft_len(const char *s) { size_t i; i = 0; while (s[i] != '\0') i++; return (i); }