NCEPLIBS-bufr  12.0.1
capit.f
Go to the documentation of this file.
1 C> @file
2 C> @brief Capitalize a character string.
3 C>
4 C> @author J. Woollen @date 2002-05-14
5 
6 C> This subroutine capitalizes all of the alphabetic characters in
7 C> a string. The string is modified in place.
8 C>
9 C> @param[in,out] STR - character*(*): String
10 C>
11 C> @author J. Woollen @date 2002-05-14
12  SUBROUTINE capit(STR)
13 
14  CHARACTER*(*) STR
15  CHARACTER*26 UPCS,LWCS
16  DATA upcs/'ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
17  DATA lwcs/'abcdefghijklmnopqrstuvwxyz'/
18 
19  DO 20 i=1,len(str)
20  DO 10 j=1,26
21  IF(str(i:i).EQ.lwcs(j:j)) THEN
22  str(i:i) = upcs(j:j)
23  GOTO 20
24  ENDIF
25 10 CONTINUE
26 20 CONTINUE
27 
28  RETURN
29  END
subroutine capit(STR)
This subroutine capitalizes all of the alphabetic characters in a string.
Definition: capit.f:13