1 |
guez |
32 |
module strlowercase_m |
2 |
|
|
|
3 |
|
|
implicit none |
4 |
|
|
|
5 |
|
|
contains |
6 |
|
|
|
7 |
|
|
!= |
8 |
|
|
SUBROUTINE strlowercase (str) |
9 |
|
|
!--------------------------------------------------------------------- |
10 |
|
|
!- Converts a string into lowercase |
11 |
|
|
!--------------------------------------------------------------------- |
12 |
|
|
IMPLICIT NONE |
13 |
|
|
!- |
14 |
|
|
CHARACTER(LEN=*) :: str |
15 |
|
|
!- |
16 |
|
|
INTEGER :: i,ic |
17 |
|
|
!--------------------------------------------------------------------- |
18 |
|
|
DO i=1,LEN_TRIM(str) |
19 |
|
|
ic = IACHAR(str(i:i)) |
20 |
|
|
IF ( (ic >= 65) .AND. (ic <= 90) ) str(i:i) = ACHAR(ic+32) |
21 |
|
|
ENDDO |
22 |
|
|
!----------------------------- |
23 |
|
|
END SUBROUTINE strlowercase |
24 |
|
|
|
25 |
|
|
end module strlowercase_m |