22 lines
1.0 KiB
C
22 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: tchivert <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2019/04/04 17:37:05 by tchivert #+# #+# */
|
|
/* Updated: 2019/09/04 05:13:31 by tchivert ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
int ft_strcmp(const char *s1, const char *s2)
|
|
{
|
|
int i;
|
|
|
|
i = 0;
|
|
while (s1[i] == s2[i] && s1[i] && s2[i])
|
|
i++;
|
|
return ((unsigned char)s1[i] - (unsigned char)s2[i]);
|
|
}
|