Integer.digits/2

defmodule Integer do
  def digits(integer, base \\ 10)
end

Converts an Integer to a charlist.