      subroutine strlen(string,i1,i2)
      character string*(*)
      do 10 i=len(string),1,-1
        if(string(i:i).ne.' ')then
          i2=i
          goto 11
        endif
   10   continue
   11 do 20 i=1,len(string)
        if(string(i:i).ne.' ')then
          i1=i
          return
        endif
   20   continue
      return
      end
