refactor Apex.Format.Utils

I noticed that some places in Apex.Format.Utils can be rewritten and expressed clearly with Elixir's built-in methods.