You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
int my_strncmp(char *s1, char *s2, unsigned int n)
|
|
{
|
|
unsigned int i;
|
|
|
|
i = 0;
|
|
if (n == 0)
|
|
return (0);
|
|
while (s1[i] == s2[i] && s1[i] != '\0' && i < n - 1)
|
|
i++;
|
|
return (s1[i] - s2[i]);
|
|
}
|