In Elixir, how do you format numbers with string interpolation

You can use String.pad_leading/3

my_count
|> Integer.to_string
|> String.pad_leading(3, "0")

Leave a Comment