15 lines
194 B
Plaintext
15 lines
194 B
Plaintext
strncmp(s1, s2, n)
|
|
{
|
|
local i;
|
|
|
|
if (n == 0)
|
|
return (0);
|
|
i = 0;
|
|
loop
|
|
{
|
|
if (i == n - 1 | [s1 + i] != [s2 + i] | [s1 + i] == 0 | [s2 + i] == 0)
|
|
return ([s1 + i] - [s2 + i]);
|
|
i++;
|
|
}
|
|
}
|