home *** CD-ROM | disk | FTP | other *** search
-
- /*
- * STRSTR.C find one string in another
- *
- * (c)Copyright 1990, Matthew Dillon, All Rights Reserved
- */
-
- #include <string.h>
- #include <errno.h>
-
- char *
- strstr(s1, s2)
- const char *s1;
- const char *s2;
- {
- short len2 = strlen(s2);
-
- while (*s1) {
- if (*s1 == *s2 && strncmp(s1, s2, len2) == 0)
- return(s1);
- ++s1;
- }
- return(NULL);
- }
-
-