-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strequ.c
More file actions
32 lines (29 loc) · 1.2 KB
/
ft_strequ.c
File metadata and controls
32 lines (29 loc) · 1.2 KB
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
27
28
29
30
31
32
/* ************************************************************************** */
/* LE - / */
/* / */
/* ft_strequ.c .:: .:/ . .:: */
/* +:+:+ +: +: +:+:+ */
/* By: thperchi <marvin@le-101.fr> +:+ +: +: +:+ */
/* #+# #+ #+ #+# */
/* Created: 2018/07/11 03:21:17 by thperchi #+# ## ## #+# */
/* Updated: 2018/10/12 05:42:52 by thperchi ### #+. /#+ ###.fr */
/* / */
/* / */
/* ************************************************************************** */
#include "libft.h"
int ft_strequ(char const *s1, char const *s2)
{
int x;
x = 0;
if (s1 == NULL || s2 == NULL)
return (0);
while (s1[x] && s2[x])
{
if (s1[x] != s2[x])
return (0);
x++;
}
if (s1[x] != s2[x])
return (0);
return (1);
}