File: str2.c

package info (click to toggle)
transfig 1%3A3.2.1-8
  • links: PTS
  • area: main
  • in suites: slink
  • size: 1,588 kB
  • ctags: 2,063
  • sloc: ansic: 15,652; makefile: 1,166; sh: 38; csh: 10
file content (12 lines) | stat: -rw-r--r-- 209 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
char *strstr(s1, s2)
    char *s1, *s2;
{
    int len2;
    char *stmp;

    len2 = strlen(s2);
    for (stmp = s1; *stmp != NULL; stmp++)
	if (strncmp(stmp, s2, len2)==0)
	    return stmp;
    return NULL;
}