copy on git
This commit is contained in:
commit
42653de246
205 changed files with 7459 additions and 0 deletions
23
libft/ft_strcmp.c
Executable file
23
libft/ft_strcmp.c
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_strcmp.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: thrieg <thrieg@student.42mulhouse.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/11/08 13:50:48 by thrieg #+# #+# */
|
||||
/* Updated: 2025/02/16 19:04:42 by thrieg ### ########.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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue