将字符变量转换为大写(规范)
版本:实验性
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | string |
pure function to_upper(string) result(upper_string) character(len=*), intent(in) :: string character(len=len(string)) :: upper_string integer :: i do i = 1, len(string) upper_string(i:i) = char_to_upper(string(i:i)) end do end function to_upper