Programming Elixir 1.6: Exercise Solutions: Strings and Binaries-5

@pragdave

Two typos. The correct one should be:

  defp center_one_string(field_width, {string, length}) do
    ~s[#{String.duplicate(" ", div(field_width - length, 2))}#{string}]
  end

MyString.center %s{ cat zebra elephant }