Python textwrap.wrap, for the wordwrap filter, with the options that the filter uses: no tab expansion, no whitespace replacement, and whitespace dropped at the start and end of the lines.
It splits the text into chunks of words and whitespace, at hyphens when break_on_hyphens is set, with the regular expressions of Python, and fills each line with as many chunks as fit in width code points.
Summary
Functions
Wraps text into lines of at most width code points.