I want to print out a string like
IO.puts("Count: #{my_count}")
But I want leading zeroes in the output like
Count: 006
How do I do that and where is that documentation?
You can use String.pad_leading/3
my_count
|> Integer.to_string
|> String.pad_leading(3, "0")