mirror of
https://github.com/antoinevignau/source.git
synced 2025-01-20 02:30:40 +00:00
1 line
454 B
C
Executable File
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);
|
|
}
|