Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string | |||
type(ESMF_KeywordEnforcer), | optional | :: | keywordEnforcer | |||
integer, | intent(out), | optional | :: | rc |
function ESMF_UtilStringUpperCase(string, keywordEnforcer, rc) ! ! !ARGUMENTS: character(len=*), intent(in) :: string type(ESMF_KeywordEnforcer), optional:: keywordEnforcer ! must use keywords below integer, intent(out), optional :: rc ! !RETURN VALUE: character(len (string)) :: ESMF_UtilStringUpperCase ! ! !DESCRIPTION: ! Converts given string to uppercase. ! ! The arguments are: ! \begin{description} ! \item[string] ! A character string. ! \item[{[rc]}] ! Return code; equals {\tt ESMF\_SUCCESS} if there are no errors. ! \end{description} ! ! !EOP integer :: i character(len=1) :: c integer, parameter :: shift = ichar('a') - ichar('A') do i = 1, len(string) c = string(i:i) if(c .ge. 'a' .and. c .le. 'z') then c = char(ichar(c) - shift) endif ESMF_UtilStringUpperCase(i:i) = c enddo if (present(rc)) rc = ESMF_SUCCESS end function ESMF_UtilStringUpperCase