C+ C NAME: C LocFirst0 C PURPOSE: C Find the first occurrence of string cFnd in string cStr C CALLING SEQUENCE: function LocFirst0(L1,cFnd,L2,cStr) C INPUTS: C L1 integer only cFnd(:L1) is searched for C cFnd character*(*) string to be searched for C L2 integer only cStr(:L2) is searched C cStr character*(*) string to be searched C OUTPUTS: C L integer position of first/last occurrence, or C 0 if cFnd not found C PROCEDURE: C > The index function has the quirky property that it returns 1 when C searching for a zero-length string, i.e. C I = index('abcd',str(:0)) will set I = 1. C LocFirst0 will return 0 instead. C MODIFICATION HISTORY: C JUL-1995, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer L1 character cFnd*(*) integer L2 character cStr*(*) LocFirst0 = 0 if (L1*L2 .eq. 0) return LocFirst0 = LocFirst(cFnd(:L1),cStr(:L2)) return end