Yes, we're reinventing ...
the Unix 'fmt' command
and Text::Wrap (Perl core)
and Text::Format (CPAN)
and textwrap.py (Python core)
and {gq} (built into Vim)
and M-q (built into Emacs)
and ...