ft_strequ.c 1.1 KB

1234567891011121314151617181920212223242526
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_strequ.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/11/06 18:27:18 by mazimi #+# #+# */
  9. /* Updated: 2014/12/08 15:50:48 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. int ft_strequ(char const *s1, char const *s2)
  14. {
  15. int i;
  16. i = -1;
  17. if (s1 == NULL || s2 == NULL)
  18. return (0);
  19. while (s1[++i] || s2[i])
  20. if (s1[i] != s2[i])
  21. return (0);
  22. return (1);
  23. }