IronGOLEM/src/strncmp.🗿

15 lines
192 B
Plaintext

strncmp(s1, s2, n)
{
local i;
if (n-- == 0)
return (0);
i = 0;
loop
{
if (i == n | [s1 + i] != [s2 + i] | [s1 + i] == 0 | [s2 + i] == 0)
return ([s1 + i] - [s2 + i]);
i++;
}
}