Application Kata „Wordwrap“
Write an application that rearranges a text so that lines are wrapped at a given column width.
The following illustration shows how the application may look like.
The user will enter the text into a textbox. Furthermore the user gives the number of characters per line. The example shows 25 characters as the new line length. Clicking the Wrap button wraps the text. The result is shown in the lower textbox.
The program can be written as a command line application.
Filename and width oft he wrapped text are given as command line parameters:
C:> wrap hansel-and-gretel.txt 25
Hansel and Gretel are
young children whose
father is a woodcutter.
When a great famine
settles over the land,
the woodcutter's abusive
second wife decides to
take the children into
Integrate a hyphenation library like NHunspell  to split words into syllables.
“I am the founder of Majer Consulting and Majer Training and an experienced software developer, trainer and consultant. I have been on the road in the SAP world since 1998, supporting numerous projects, and have developed a passion for software engineering, software testing and agile development methods such as TDD. When I am not servicing customers or holding seminars, I am speaking at conferences or writing my next book.”