24 lines
1.0 KiB
C
24 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: scebula <scebula@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2015/11/26 09:30:45 by scebula #+# #+# */
|
|
/* Updated: 2015/11/27 19:43:01 by scebula ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
int ft_strcmp(const char *s1, const char *s2)
|
|
{
|
|
while (*s1 && *s1 == *s2)
|
|
{
|
|
s1++;
|
|
s2++;
|
|
}
|
|
return ((unsigned char)*s1 - (unsigned char)*s2);
|
|
}
|