ft_memcmp: initial implementation

also fix a small clarity issue in ft_strncmp
This commit is contained in:
Khaïs COLIN 2024-10-16 15:34:30 +02:00
parent b81ad331b5
commit 1c3df31518
4 changed files with 54 additions and 4 deletions

View file

@ -17,7 +17,7 @@ int ft_strncmp(const char *s1, const char *s2, size_t n)
size_t i;
i = 0;
while (s1[i] != '\0' && s2[i] != 0)
while (s1[i] != '\0' && s2[i] != '\0')
{
if (i >= n)
return (0);