24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2022/07/31 19:17:11 by cchauvet #+# #+# */
|
|
/* Updated: 2022/07/31 21:00:11 by cchauvet ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "rush02.h"
|
|
|
|
int ft_strcmp(char *str1, char *str2)
|
|
{
|
|
while (*str1 == *str2 && *str1 != 0 && *str2)
|
|
{
|
|
str1++;
|
|
str2++;
|
|
}
|
|
return (*str1 - *str2);
|
|
}
|