title: Trimming whitespace from the END of a string only, with jQuery
body: <p>I know of the jQuery $.trim() function, but what I need is a way to trim whitespace from the END of a string only, and NOT the beginning too.</p>
  
  <p>So</p>
  
  <pre><code>  str ="     this is a string     ";
  </code></pre>
  
  <p>would become</p>
  
  <pre><code>  str ="     this is a string";
  </code></pre>
  
  <p>Any suggestions?</p>
  
  <p>Thanks!</p>