home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d2xx
/
d222
/
plplot.lha
/
Plplot
/
src
/
source.zoo
/
stindex.c
< prev
next >
Wrap
C/C++ Source or Header
|
1989-05-15
|
431b
|
20 lines
#include "plplot.h"
int stindex(str1,str2)
char *str1,*str2;
{
int base;
int str1ind;
int 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(base);
}
return(-1); /* search failed */
}