Left pad the input string with zeros
Returns a new string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_type), | intent(in) | :: | string | |||
| integer, | intent(in) | :: | output_length |
pure function zfill_string(string, output_length) result(res) type(string_type), intent(in) :: string integer, intent(in) :: output_length type(string_type) :: res res = string_type(padl(char(string), output_length, "0")) end function zfill_string