1
! $Id: strutil.f 11680 2011-03-27 17:57:51Z airwin $
3
! Copyright (C) 2004 Alan W. Irwin
5
! This file is part of PLplot.
7
! PLplot is free software; you can redistribute it and/or modify
8
! it under the terms of the GNU Library General Public License as published
9
! by the Free Software Foundation; either version 2 of the License, or
10
! (at your option) any later version.
12
! PLplot is distributed in the hope that it will be useful,
13
! but WITHOUT ANY WARRANTY; without even the implied warranty of
14
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
! GNU Library General Public License for more details.
17
! You should have received a copy of the GNU Library General Public License
18
! along with PLplot; if not, write to the Free Software
19
! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21
subroutine plstrf2c(string1, string2, maxlen)
25
character*(*) string1, string2
29
limit = min0(islen(string1),maxlen-1)
31
string2(i:i) = string1(i:i)
33
string2(limit+1:limit+1) = char(0)
39
subroutine plstrc2f(string1, string2)
41
character*(*) string1, string2
44
character*300 stringbuf
47
10 if (ichar(string1(limit:limit)) .eq. 0) goto 20
48
stringbuf(limit:limit) = string1(limit:limit)
52
20 if(limit.gt.1) then
53
string2 = stringbuf(1:limit-1)
62
integer function islen(string)
66
do 100 i = len(string),1,-1
67
if (string(i:i) .ne. ' ') then
73
if(len(string).eq.0) then
74
C If string is length 0, return length 0
77
C If string is blank, return length of 1