padr Interface

public interface padr

Right pad the input string Specifications


Module Procedures

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

Right pad the input string with " " (1 whitespace)

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 padr_string_pad_with(string, output_length, pad_with) result(res)

Right pad the input string with the 'pad_with' character

Returns a new string

Arguments

Type IntentOptional Attributes Name
type(string_type), intent(in) :: string
integer, intent(in) :: output_length
character(len=1), intent(in) :: pad_with

Return Value type(string_type)

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

Right pad the input string with " " (1 whitespace)

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)

private pure function padr_char_pad_with(string, output_length, pad_with) result(res)

Right pad the input string with the 'pad_with' character

Returns a new string

Arguments

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

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