22 lines
1023 B
C
22 lines
1023 B
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/07/18 12:59:45 by cchauvet #+# #+# */
|
|
/* Updated: 2022/07/21 13:40:07 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
int ft_strcmp(char *s1, char *s2)
|
|
{
|
|
while ((*s1 != 0) && (*s2 != 0) && (*s1 == *s2))
|
|
{
|
|
s1++;
|
|
s2++;
|
|
}
|
|
return (*s1 - *s2);
|
|
}
|