%N indek %F $MIR/src/subs/string.for
%D Find position of substring, return length if not found.
%P rjs
%: strings
%B
      integer function indek (string, substrng)

      character*(*) string, substrng
  ---------------------------------------------------------------------
  indek is the same as the intrinsic function index, except that it
  returns the length of the string plus 1 rather than zero if the
  substring is not found.

 Example of use:

   filename = dir(:nelc(dir)) // name(:indek(name,'.')-1 ) // ' '

 Now only one statement is needed instead of three - find
 index(name,'.'); test if ok; the above.

 Input:
   string:      the string to search in
   substrng:   the substring to search for
