aboutsummaryrefslogtreecommitdiff
path: root/src/str/ft_strncmp.c
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-02-10 04:24:29 +0100
committerCharles <sircharlesaze@gmail.com>2020-02-10 04:24:29 +0100
commitfc457992114e71989e5cdeab452bc054a400a397 (patch)
tree4078af0485fe91f3bbf56984c2a3f171ff2f51de /src/str/ft_strncmp.c
parent4800d3ca472058f0161970aa55c6debb453e5d00 (diff)
downloadlibft-fc457992114e71989e5cdeab452bc054a400a397.tar.gz
libft-fc457992114e71989e5cdeab452bc054a400a397.tar.bz2
libft-fc457992114e71989e5cdeab452bc054a400a397.zip
Fixing ft_strcmp, Added ft_strcasecmp, ft_strncasecmp
Diffstat (limited to 'src/str/ft_strncmp.c')
-rw-r--r--src/str/ft_strncmp.c5
1 files changed, 3 insertions, 2 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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]);
}