Removing consecutive blank rows from StringBuilder
<p>I have a Stringbuilder object that has been populated from a text file.
How can I check the StringBuilder object for and remove consecutive "blank" lines.</p>

<p>i.e</p>

<pre><code>Line 1: This is my text
Line 2:
Line 3: Another line after the 1st blank one
Line 4: 
Line 5:
Line 6: Next line after 2 blank lines
</code></pre>

<p>(Line numbers given as reference only) </p>

<p>The blank line on Line 2 is fine, but I would like to remove the duplicate blank line, on Line 5, and so on. </p>

<p>If for argument sake Line 6 would have also been a blank line, and a Line 7 had a value, I would like Blank Line 5 and Blank Line 6 removed, so that there would only be 1 blank line between the Line 3 and Line 7.</p>

<p>Thanks in advance.</p>
