@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 } 
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 }