with a length of 4 digits, the output of the integer 5 is "0005"
string:right(integer_to_list(5), 4, $0).
io:format("~4..0B~n", [5]).
with a length of 4 digits, the output of the integer 5 is "0005"
string:right(integer_to_list(5), 4, $0).
io:format("~4..0B~n", [5]).