-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strequ.c
23 lines (21 loc) · 1.08 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strequ.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: dbrophy <dbrophy@student.42.us.org> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/19 12:52:45 by dbrophy #+# #+# */
/* Updated: 2020/02/19 12:52:45 by dbrophy ### ########.fr */
/* */
/* ************************************************************************** */
#include "stdlib.h"
int ft_strequ(const char *s1, const char *s2)
{
if (s1 == NULL || s2 == NULL)
return (0);
while (*s1 != 0 && *s2 != 0)
if (*(s1++) != *(s2++))
return (0);
return (*s1 == *s2);
}