2023-04-26 07:02:44 -04:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* ::: :::::::: */
|
|
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
/* Created: 2023/01/04 19:20:47 by cchauvet #+# #+# */
|
2023-04-26 08:25:49 -04:00
|
|
|
/* Updated: 2023/04/26 12:23:52 by cchauvet ### ########.fr */
|
2023-04-26 07:02:44 -04:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "extra.h"
|
|
|
|
|
2023-04-26 08:25:49 -04:00
|
|
|
int ft_strcmp(const char *s1, const char *s2)
|
2023-04-26 07:02:44 -04:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
|
|
|
|
i = 0;
|
|
|
|
while (s1[i] == s2[i] && s1[i] != '\0')
|
|
|
|
i++;
|
|
|
|
return (s1[i] - s2[i]);
|
|
|
|
}
|