-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_strcmp.c
More file actions
23 lines (20 loc) · 1.09 KB
/
ft_strcmp.c
File metadata and controls
23 lines (20 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strncmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: madufeal <madufeal@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/12/08 17:30:38 by tchemin #+# #+# */
/* Updated: 2026/01/28 14:45:02 by madufeal ### ########.fr */
/* */
/* ************************************************************************** */
#include "push_swap.h"
int ft_strcmp(char *s1, char *s2)
{
unsigned int i;
i = 0;
while ((unsigned char)s1[i] && (unsigned char)s1[i] == (unsigned char)s2[i])
i++;
return ((unsigned char)s1[i] - (unsigned char)s2[i]);
}