Remove last line from string
<p>How do I remove the last line from a string, if I dont know how big the string will be?</p>

<pre><code>var tempHTML = content.document.body.innerHTML;
var HTMLWithoutLastLine = RemoveLastLine(tempHTML);

function RemoveLastLine(var x)
{
   // code
} 
</code></pre>
