to_lower 函数

public pure function to_lower(string) result(lower_string)

将字符变量转换为小写 (规范)

版本:实验性

参数

类型 意图可选 属性 名称
character(len=*), intent(in) :: string

返回值 character(len=len)


源代码

    pure function to_lower(string) result(lower_string)
        character(len=*), intent(in) :: string
        character(len=len(string)) :: lower_string
        integer :: i

        do i = 1, len(string)
            lower_string(i:i) = char_to_lower(string(i:i))
        end do

    end function to_lower