2.9BSD/usr/man/cat3/lenstr.3f


LENSTR(3F)          UNIX Programmer's Manual           LENSTR(3F)

NAME
     lenstr - Fortran function for finding string length

SYNTAX
     lenstr(string)
     character*m string

DESCRIPTION
     _L_e_n_s_t_r is an integer*2 function that determines the actual
     number of characters in a character variable including
     imbedded blanks but omitting trailing blanks. If a null byte
     '\0' occurs in the string, the length is the number of char-
     acters before the null byte.

EXAMPLE
           character*10 a,b
           a="ab then"
           b=" this is     "
           write(6,1) lenstr(a),lenstr(b)
       1   format(2i5)
           end

     produces

         7    8

AUTHOR
     Peter L. Ward, U.S. Geological Survey, Menlo Park, Califor-
     nia

Printed 5/17/83                                                 1