IronGOLEM/src/strncmp.🗿

15 lines
194 B
Plaintext
Raw Normal View History

2023-06-18 09:37:24 -04:00
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++;
}
}