title: How do I remove trailing whitespace, then the last character?
body: <p>For example: <code>The fox is red.x________</code> (Consider underscores as spaces). How can I remove the white space and the x?</p>
  
  <p><strong>Edit:</strong>
  What if there are several lines like this?<br></p>
  
  <pre><code>The fox is red.x________
  The fox is grey.x________
  The fox is blue.x________
  The fox is green.x________
  </code></pre>