-
Notifications
You must be signed in to change notification settings - Fork 0
/
ft_strequ.c
executable file
·26 lines (23 loc) · 1.12 KB
/
ft_strequ.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strequ.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mlamarre <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/10/30 16:53:54 by mlamarre #+# #+# */
/* Updated: 2016/10/31 10:19:44 by mlamarre ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_strequ(char const *s1, char const *s2)
{
int i;
i = 0;
while (s1[i] && s2[i] && (unsigned char)s1[i] == (unsigned char)s2[i])
i++;
if ((unsigned char)s1[i] == (unsigned char)s2[i])
return (1);
else
return (0);
}