split a line of text into two lines using a <br> in c#
<p>I have the following code (inherited!) that will split a line of text into 2 lines with a html line break <code>&lt;br/&gt;</code>.</p>

<pre><code>public static string BreakLineIntoTwo(this HtmlHelper helper, string input)
{
    if (string.IsNullOrEmpty(input)) return string.Empty;
    if (input.Length &lt; 12) return input;

    int pos = input.Length / 2;

    while ((pos &lt; input.Length) &amp;&amp; (input[pos] != ' '))
        pos++;

    if (pos &gt;= input.Length) return input;

    return input.Substring(0, pos) + "&lt;br/&gt;" + input.Substring(pos + 1);
}
</code></pre>

<p>The rules seem to be if the line of text is less than 12 characters then just return it. If not find the middle of the text and move along to the next space and insert a line break. We can also assume that there are no double spaces and no additional spaces at the end and the the text is not just one long line of letters <code>abcdefghijkilmnopqrstuvwxyz</code> etc.</p>

<p>This seems to work fine and my question is <code>Is there a more elegant approach to this problem?</code></p>
