Changes a string to lower case
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | in_str |
pure function to_lower (in_str) result(string)
character(*), intent(in) :: in_str
character(len_trim(in_str)) :: string
integer :: ic, i
do i = 1, len(string)
ic = index(UPPERCASE_chars, in_str(i:i))
if (ic > 0) then
string(i:i) = lowercase_chars(ic:ic)
else
string(i:i) = in_str(i:i)
end if
end do
end function to_lower