zfill Interface

public interface zfill

Left pad the input string with zeros. Specifications


Module Procedures

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

Left pad the input string with zeros

Returns a new string

Arguments

Type IntentOptional Attributes Name
type(string_type), intent(in) :: string
integer, intent(in) :: output_length

Return Value type(string_type)

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

Left pad the input string with zeros

Returns a new string

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
integer, intent(in) :: output_length

Return Value character(kind=output_length), len=max)