46 '$Id: String_Utility.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 48 CHARACTER(*),
PARAMETER ::
lower_case =
'abcdefghijklmnopqrstuvwxyz' 49 CHARACTER(*),
PARAMETER ::
upper_case =
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 96 FUNCTION strupcase( Input_String )
RESULT( Output_String )
98 CHARACTER(*),
INTENT(IN) :: input_string
100 CHARACTER(LEN(Input_String)) :: output_string
105 output_string = input_string
108 DO i = 1, len(output_string)
110 IF ( n /= 0 ) output_string(i:i) =
upper_case(n:n)
156 FUNCTION strlowcase( Input_String )
RESULT( Output_String )
158 CHARACTER(*),
INTENT(IN) :: input_string
160 CHARACTER(LEN(Input_String)) :: output_string
165 output_string = input_string
168 DO i = 1, len(output_string)
170 IF ( n /= 0 ) output_string(i:i) =
lower_case(n:n)
242 FUNCTION strcompress( Input_String, n )
RESULT( Output_String )
244 CHARACTER(*),
INTENT(IN) :: input_string
245 INTEGER,
OPTIONAL,
INTENT(OUT) :: n
247 CHARACTER(LEN(Input_String)) :: output_string
249 INTEGER,
PARAMETER :: iachar_space = 32
250 INTEGER,
PARAMETER :: iachar_tab = 9
253 INTEGER :: iachar_character
264 DO i = 1, len(input_string)
268 iachar_character = iachar(input_string(i:i))
272 IF ( iachar_character /= iachar_space .AND. &
273 iachar_character /= iachar_tab )
THEN 275 output_string(j:j) = input_string(i:i)
282 IF (
PRESENT(n) ) n = j
332 CHARACTER(*),
INTENT(IN OUT) :: String
334 INTEGER,
PARAMETER :: IACHAR_NULL = 0
339 character_loop:
DO i = 1, len(
string)
340 IF ( iachar(
string(i:i)) == iachar_null )
THEN 344 END DO character_loop
349 CHARACTER(*),
INTENT(IN OUT) :: String(:)
subroutine strclean_scalar(String)
character(len(input_string)) function, public strlowcase(Input_String)
character(*), parameter lower_case
character(*), parameter module_rcs_id
subroutine strclean_rank1(String)
character(*), parameter upper_case
character(len(input_string)) function, public strcompress(Input_String, n)
character(len(input_string)) function, public strupcase(Input_String)