lowercase_string Function

public pure elemental function lowercase_string(str) result(s_lower)

Returns lowercase version of the CK string.

Arguments

Type IntentOptional AttributesName
character(kind=CK,len=*), intent(in) :: str

input string

Return Value character(kind=CK,len=(len(str)))

lowercase version of the string


Called by

proc~~lowercase_string~~CalledByGraph proc~lowercase_string lowercase_string proc~name_strings_equal name_strings_equal proc~name_strings_equal->proc~lowercase_string

Contents

Source Code


Source Code

    pure elemental function lowercase_string(str) result(s_lower)

    implicit none

    character(kind=CK,len=*),intent(in) :: str      !! input string
    character(kind=CK,len=(len(str)))   :: s_lower  !! lowercase version of the string

    integer :: i  !! counter
    integer :: j  !! index of uppercase character

    s_lower = str

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

    end function lowercase_string