# Kata > WordWrap

Given a string and a maximum line length, insert line breaks as required so that no line exceeds the maximum.

These line breaks should replace spaces between words.

However, if a single word is longer than the maximum line length then it should be broken and a '-' character used to indicate this.