42_solong/libftx/extra/ft_strcmp.c

21 lines
1014 B
C
Raw Normal View History

2023-01-04 14:07:13 -05:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/01/04 19:20:47 by cchauvet #+# #+# */
/* Updated: 2023/01/04 19:22:20 by cchauvet ### ########.fr */
/* */
/* ************************************************************************** */
#include "extra.h"
int ft_strcmp(char *s1, char *s2)
{
while (*s1 == *s2 && *s1 != '\0')
s1++;
return (*s1 - *s2);
}