22 lines
1.0 KiB
C
22 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: gbrochar <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2015/11/28 14:52:37 by gbrochar #+# #+# */
|
|
/* Updated: 2015/11/28 15:34:12 by gbrochar ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
int ft_strcmp(const char *s1, const char *s2)
|
|
{
|
|
while (*s1 || *s2)
|
|
if (*s1++ != *s2++)
|
|
return ((unsigned char)*--s1 - (unsigned char)*--s2);
|
|
return (0);
|
|
}
|