Debian Codegraph @

packages/seacas/libraries/suplib/indexr.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 INTEGER FUNCTION INDEXR (STRING, CHAR)
9 C=======================================================================
10 C --*** INDEXR *** (STRLIB) Find last occurrence of CHAR in STRING
11 C --
12 C --INDEXR returns the last position of CHAR in STRING
13 C --if not found, returns 0
14 C --
15
16 CHARACTER*(*) STRING
17 CHARACTER*1 CHAR
18
19 DO i=len(string),1,-1
20 if (string(i:i) .eq. char) then
21 indexr = i
22 return
23 end if
24 end do
25
26 indexr = 0
27 return
28 end