ft_strequ.c 1.1 KB

12345678910111213141516171819202122232425
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_strequ.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2015/11/25 19:53:56 by bchanot #+# #+# */
  9. /* Updated: 2018/10/29 11:58:31 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "libft.h"
  13. int ft_strequ(const char *const s1, const char *const s2)
  14. {
  15. if (s1 && s2)
  16. {
  17. if (ft_strcmp(s1, s2) == 0)
  18. return (true);
  19. }
  20. else if (s1 == s2)
  21. return (true);
  22. return (false);
  23. }