libft
ft_strequ.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* ft_strequ.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2019/09/05 00:49:32 by unite #+# #+# */
10 /* Updated: 2020/07/16 02:49:20 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "libft.h"
15 
24 int ft_strequ(const char *s1, const char *s2)
25 {
26  if (!s1 && !s2)
27  return (1);
28  else if (!s1 || !s2)
29  return (0);
30  while (*s1 || *s2)
31  {
32  if (*s1 != *s2)
33  return (0);
34  s1++;
35  s2++;
36  }
37  return (1);
38 }
ft_strequ
int ft_strequ(const char *s1, const char *s2)
Checks that two strings are identical.
Definition: ft_strequ.c:24
libft.h