Takes a string and converts to lowercase characters
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | string |
function utility_lowercase(string)! !================================================! ! !! Takes a string and converts to !! lowercase characters ! !================================================! use w90_constants, only: maxlen implicit none character(len=*), intent(in) :: string character(len=maxlen) :: utility_lowercase integer :: iA, iZ, idiff, ipos, ilett iA = ichar('A') iZ = ichar('Z') idiff = iZ - ichar('z') utility_lowercase = string do ipos = 1, len(string) ilett = ichar(string(ipos:ipos)) if ((ilett .ge. iA) .and. (ilett .le. iZ)) & utility_lowercase(ipos:ipos) = char(ilett - idiff) end do utility_lowercase = trim(adjustl(utility_lowercase)) return end function utility_lowercase