NCEPLIBS-bufr 11.7.1
capit.f
Go to the documentation of this file.
1C> @file
2C> @brief Capitalize a character string
3
4C> This subroutine capitalizes all of the alphabetic characters in
5C> a string. The string is modified in place.
6C>
7C> @author J. Woollen
8C> @date 2002-05-14
9C>
10C> @param[in,out] STR -- character*(*): String
11C>
12C> <b>Program History Log:</b>
13C> | Date | Programmer | Comments |
14C> | -----|------------|----------|
15C> | 2002-05-14 | J. Woollen | Original author |
16C> | 2012-03-02 | J. Ator | Changed name of ups array to upcs to avoid namespace contention with function ups() |
17C>
18 SUBROUTINE capit(STR)
19
20 CHARACTER*(*) STR
21 CHARACTER*26 UPCS,LWCS
22 DATA upcs/'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
23 DATA lwcs/'abcdefghijklmnopqrstuvwxyz'/
24
25 DO 20 i=1,len(str)
26 DO 10 j=1,26
27 IF(str(i:i).EQ.lwcs(j:j)) THEN
28 str(i:i) = upcs(j:j)
29 GOTO 20
30 ENDIF
3110 CONTINUE
3220 CONTINUE
33
34 RETURN
35 END
subroutine capit(STR)
This subroutine capitalizes all of the alphabetic characters in a string.
Definition: capit.f:19