blob: 45ba592a00adecd09ba922dad45fb132cb16dfde (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcasecmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/10 04:08:38 by cacharle #+# #+# */
/* Updated: 2020/02/10 04:22:56 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_str.h"
#include "libft_types.h"
int strcasecmp(const char *s1, const char *s2)
{
while (*s1 && *s2 && ft_tolower(*s1) == ft_tolower(*s2))
{
s1++;
s2++;
}
return ((t_ftuchar)ft_tolower(*s1) - (t_ftuchar)ft_tolower(*s2));
}
|