How to format a number with padding in Erlang

前端 未结 4 1511
北荒
北荒 2020-12-06 09:17

I need to pad the output of an integer to a given length.

For example, with a length of 4 digits, the output of the integer 4 is \"0004\" instead of \"4\". How can I

4条回答
提交回复
热议问题