home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 8
/
CDASC08.ISO
/
NEWS
/
677
/
TSRTOOLS
/
STRNCMP.C
< prev
next >
Wrap
Text File
|
1993-10-07
|
307b
|
20 lines
/*
strncmp.C
Copyright (C) 1993, Geoff Friesen B.Sc.
All rights reserved.
*/
#define INCL_STRNCMP
int strncmp (const char *s1, const char *s2, size_t maxlen)
{
if (!maxlen)
return 0;
for (; *s1 == *s2; s1++, s2++)
if (!maxlen--)
return 0;
return (*s1-*s2);
}