function strpos1,targ,srch,pos targ=string(targ) srch=string(srch) if (n_elements(pos) eq 0) then pos = 0 t=byte(targ) n=n_elements(t) m=strlen(srch) p=lindgen(m) i=pos for i=pos,n do begin if (srch eq string(t(p+i)))then return,i endfor return ,-1 end