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 #+# #+# */
|
2023-01-05 13:04:29 -05:00
|
|
|
/* Updated: 2023/01/05 13:20:20 by cchauvet ### ########.fr */
|
2023-01-04 14:07:13 -05:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "extra.h"
|
|
|
|
|
|
|
|
int ft_strcmp(char *s1, char *s2)
|
|
|
|
{
|
2023-01-05 13:04:29 -05:00
|
|
|
int i;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while (s1[i] == s2[i] && s1[i] != '\0')
|
|
|
|
i++;
|
|
|
|
return (s1[i] - s2[i]);
|
2023-01-04 14:07:13 -05:00
|
|
|
}
|