c     Copyright (C) 2008 Vincent Eymet
c
c     KSPECTRUM is free software; you can redistribute it and/or modify
c     it under the terms of the GNU General Public License as published by
c     the Free Software Foundation; either version 3, or (at your option)
c     any later version.

c     KSPECTRUM is distributed in the hope that it will be useful,
c     but WITHOUT ANY WARRANTY; without even the implied warranty of
c     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
c     GNU General Public License for more details.

c     You should have received a copy of the GNU General Public License
c     along with KSPECTRUM; if not, see <http://www.gnu.org/licenses/>
c
      integer function strlen(st)
      integer i
      character st*(*)
      i=len(st)
      do while (st(i:i).eq.' ')
         i=i-1
      enddo
      strlen=i
      return
      end
