home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_progs
/
prog_c
/
plplot.lzh
/
PLPLOT
/
PLPLOT.LZH
/
plplot
/
src
/
stindex.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1990-03-23
|
453 b
|
20 lines
#include "plplot.h"
PLINT stindex(str1,str2)
char *str1,*str2;
{
PLINT base;
PLINT str1ind;
PLINT str2ind;
for(base=0; *(str1+base)!='\0'; base++) {
for(str1ind=base, str2ind=0; *(str2+str2ind)!='\0' &&
*(str2+str2ind) == *(str1+str1ind); str1ind++, str2ind++)
; /* no body */
if(*(str2+str2ind) == '\0')
return((PLINT)base);
}
return((PLINT)-1); /* search failed */
}