Statistics
| Revision:

root / src / CleanString.f90 @ 5

History | View | Annotate | Download (525 Bytes)

1 5 pfleura2
2 5 pfleura2
    SUBROUTINE CleanString(String,CleanStr)
3 5 pfleura2
! This subroutine cleans a string, that is: it removes some characters
4 5 pfleura2
! from it that are in CleanString input variable
5 5 pfleura2
6 5 pfleura2
      Use VarTypes
7 5 pfleura2
8 5 pfleura2
      IMPLICIT NONE
9 5 pfleura2
10 5 pfleura2
! Input Variables
11 5 pfleura2
      CHARACTER(*), INTENT(INOUT) :: String
12 5 pfleura2
      CHARACTER(*), INTENT(IN) :: CleanStr
13 5 pfleura2
14 5 pfleura2
      INTEGER(KINT) :: I,J
15 5 pfleura2
16 5 pfleura2
17 5 pfleura2
      I=Scan(String,CleanStr)
18 5 pfleura2
      DO WHILE (I/=0)
19 5 pfleura2
         String=String(1:I-1) // String (I+1:)
20 5 pfleura2
         I=Scan(String,CleanStr)
21 5 pfleura2
      END DO
22 5 pfleura2
23 5 pfleura2
    END SUBROUTINE CleanString