Writing a word-wrapping algorithm is one of the things were you may assume it takes an hour or two to solve... and then a week later you're still hunting edge cases in your code.
Found a slick way to write one? Show me your code! π
@fribbledom You can tokenize the sentences with a scanner. Then it becomes a very simple #NLP problem and you can easily lay them out to a fixed width.