Build a text wrapper. For example, split a long sentence by some character limit only at spaces.
Anonymous
Simple. Don't look at the problem from the perspective of a text wrapper. Solve it as a puzzle as a bottom to top approach. Split all the words based on spaces and store them as a list. Starting with the first word in the list, measure the length of the word (by characters) and concatenate the next word to it if the condition doesn't meet your requirement.
Check out your Company Bowl for anonymous work chats.