-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strcmp.c
More file actions
26 lines (24 loc) · 1.05 KB
/
Copy pathft_strcmp.c
File metadata and controls
26 lines (24 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strcmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aantonie <aantonie@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/10/15 00:34:02 by aantonie #+# #+# */
/* Updated: 2023/10/15 00:47:52 by aantonie ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int
ft_strcmp(const char *str1, const char *str2)
{
while (*str1 && *str2)
{
if (*str1 != *str2)
return (*str1 - *str2);
str1++;
str2++;
}
return (0);
}