lowercase Subroutine

public pure subroutine lowercase(str)

Convert the string to lowercase.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: str

Source Code

    pure subroutine lowercase(str)

    character(len=*),intent(inout) :: str

    integer :: i,idx

    do i=1,len_trim(str)
        idx = index(upper,str(i:i))
        if (idx>0) str(i:i) = lower(idx:idx)
    end do

    end subroutine lowercase