1
0

first commit

This commit is contained in:
KeyZox
2023-08-06 20:12:38 +02:00
parent 1fe062c970
commit eb6b113e51
125 changed files with 2987 additions and 0 deletions

View File

@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strncmp.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ajoly <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/07/21 10:14:08 by ajoly #+# #+# */
/* Updated: 2022/07/21 10:14:11 by ajoly ### ########.fr */
/* */
/* ************************************************************************** */
int ft_strncmp(char *s1, char *s2, unsigned int n)
{
unsigned int i;
i = 0;
if (n == 0)
{
return (0);
}
while (s1[i] == s2[i] && i + 1 < n && s1[i] != '\0' && s2[i] != '\0')
{
i++;
}
return (s1[i] - s2[i]);
}