Initial revision
This commit is contained in:
12
modules/src/string/strcmp.c
Normal file
12
modules/src/string/strcmp.c
Normal file
@@ -0,0 +1,12 @@
|
||||
/* return negative, zero or positive value if
|
||||
resp. s < t, s == t or s > t
|
||||
*/
|
||||
int
|
||||
strcmp(s, t)
|
||||
register char *s, *t;
|
||||
{
|
||||
while (*s == *t++)
|
||||
if (*s++ == '\0')
|
||||
return 0;
|
||||
return *s - *--t;
|
||||
}
|
||||
Reference in New Issue
Block a user