zfill 接口

public interface zfill

在输入字符串左侧填充零。 规范


模块过程

private pure function zfill_string(string, output_length) result(res)

在输入字符串左侧填充零

返回一个新的字符串

参数

类型 意图可选 属性 名称
type(string_type), intent(in) :: string
integer, intent(in) :: output_length

返回值 type(string_type)

private pure function zfill_char(string, output_length) result(res)

在输入字符串左侧填充零

返回一个新的字符串

参数

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

返回值 character(kind=output_length), len=max)