From e1a01cbdfd8a18a0e1bd8dcc2c6fc3745b39cbce Mon Sep 17 00:00:00 2001 From: whaffman Date: Mon, 3 Mar 2025 14:48:20 +0100 Subject: [PATCH] ft_isdigit_str should take + or -- at start of string --- src/string/ft_isdigit_str.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/string/ft_isdigit_str.c b/src/string/ft_isdigit_str.c index fb35393..919d4ec 100644 --- a/src/string/ft_isdigit_str.c +++ b/src/string/ft_isdigit_str.c @@ -6,7 +6,7 @@ /* By: whaffman +#+ */ /* +#+ */ /* Created: 2025/02/20 15:40:24 by whaffman #+# #+# */ -/* Updated: 2025/02/26 16:19:31 by whaffman ######## odam.nl */ +/* Updated: 2025/03/03 14:45:48 by whaffman ######## odam.nl */ /* */ /* ************************************************************************** */ @@ -14,6 +14,8 @@ int ft_isdigit_str(char *str) { + if(*str == '-' || *str == '+') + str++; while (*str) { if (!ft_isdigit(*str))