      FUNCTION LENSTR( INPUT_STRING )

C     * PURPOSE: RETURNS THE NUMBER OF CHARACTERS IN THE INPUT STRING.
C            
C     * MODIFICATION:
C
C     * 10/15/98 BY SCOTT TINIS
C     * FILE CREATED.

      IMPLICIT NONE

      INTEGER I
      CHARACTER INPUT_STRING*(*)   ! INPUT STRING FOR PARSING

      INTEGER   LENSTR             ! FUNCTION


      DO I = LEN( INPUT_STRING ), 1, -1
         IF (INPUT_STRING(I:I) .NE. ' ') THEN
            LENSTR = I
            GO TO 999
         END IF
      END DO

      LENSTR = 0

  999 RETURN

      END
