antoine-source/appleworksgs/Spell/Src/STRDIFF.C
2023-03-04 03:45:20 +01:00

1 line
454 B
C
Executable File

/***********************************************************************\
Filename: strdiff.c
\***********************************************************************/
/* Find the number of initial characters matching between the strings s1 and
s2 -- length of strings if no difference. */
strdiff(s1, s2)
register char *s1;
register char *s2;
{
char *start = s1;
while (*s1++ == *s2++ && *(s1-1) != 0)
;
return ((s1 - start) - 1);
}