@brief return string in lower case @author Igor S. Gerasimov @date Sep, 2021 --Initial release-- @param line - (inout)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | input_string |
pure function to_lower(input_string) result(output_string) character(*), intent(in) :: input_string character(:), allocatable :: output_string integer :: i, ic output_string = input_string do i = 1, len(output_string) ic = iachar(output_string(i:i)) if (ic <= Z_UPPER .and. ic >= A_UPPER) then output_string(i:i) = achar(ic+UPPER_TO_LOWER) end if end do end function to_lower