mirror of
https://github.com/Ladebeze66/libft.git
synced 2025-12-13 04:36:55 +01:00
24 lines
1.1 KiB
C
Executable File
24 lines
1.1 KiB
C
Executable File
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* ft_strcmp.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: fgras-ca <fgras-ca@student.42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2023/11/14 16:57:42 by fgras-ca #+# #+# */
|
|
/* Updated: 2023/11/14 17:10:27 by fgras-ca ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
|
|
int ft_strcmp(const char *s1, const char *s2)
|
|
{
|
|
while (*s1 && (*s1 == *s2))
|
|
{
|
|
s1++;
|
|
s2++;
|
|
}
|
|
return (*(const unsigned char *)s1 - *(const unsigned char *)s2);
|
|
}
|