From fc457992114e71989e5cdeab452bc054a400a397 Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 10 Feb 2020 04:24:29 +0100 Subject: Fixing ft_strcmp, Added ft_strcasecmp, ft_strncasecmp --- src/str/ft_strncmp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/str/ft_strncmp.c') diff --git a/src/str/ft_strncmp.c b/src/str/ft_strncmp.c index cd303fc..caa052b 100644 --- a/src/str/ft_strncmp.c +++ b/src/str/ft_strncmp.c @@ -6,11 +6,12 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2019/10/07 10:27:34 by cacharle #+# #+# */ -/* Updated: 2019/11/21 01:56:32 by cacharle ### ########.fr */ +/* Updated: 2020/02/10 04:17:50 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ #include "libft.h" +#include "libft_types.h" int ft_strncmp(const char *s1, const char *s2, size_t n) { @@ -21,5 +22,5 @@ int ft_strncmp(const char *s1, const char *s2, size_t n) i = 0; while (i + 1 < n && s1[i] == s2[i] && s1[i]) i++; - return ((unsigned char)s1[i] - (unsigned char)s2[i]); + return ((t_ftuchar)s1[i] - (t_ftuchar)s2[i]); } -- cgit