-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strequ.c
More file actions
25 lines (23 loc) · 1.06 KB
/
ft_strequ.c
File metadata and controls
25 lines (23 loc) · 1.06 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
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strequ.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lscariot <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/11/25 13:37:59 by lscariot #+# #+# */
/* Updated: 2015/11/27 19:49:35 by lscariot ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_strequ(char const *s1, char const *s2)
{
if (!s1 || !s2)
return (0);
while (*s1++ == *s2++)
{
if (*s1 == '\0' && *s2 == '\0')
return (1);
}
return (0);
}