title: Removing line breaks from string
body: <p>I have a string like so:</p>
  
  <pre><code>var aString = "This is a string \n\n This is the second line of the string\n\n"
  </code></pre>
  
  <p>Which inside a textview looks like so:</p>
  
  <pre><code>This is a string 
  
  This is the second line of the string
  
  
  // 2 extra lines of unnecessary white space
  </code></pre>
  
  <p>But i want it to look like this:</p>
  
  <pre><code>This is a string 
  This is the second line of the string
  </code></pre>
  
  <p>I want to remove all "\n" from the end of the string and remove \n where it repeats itself so theres no white space in the middle.</p>
  
  <p>ideally, I'm guessing the end result should be this:</p>
  
  <pre><code>var aString = "This is a string \n This is the second line of the string"
  </code></pre>