title: Removing Trailing Whitespace in .txt file
body: <p>I have multiple text files as sources for iOS app to be loaded in NSArray. Each item is in the new line as such:</p>
  
  <pre><code> item 1
   item 2
   item 3
   item 4
   item 5
  </code></pre>
  
  <p>Before I will use the txt files in project, I want to make sure, there are no trailing whitespace at the end of EACH line. Is there a way to remove those directly from source txt file using Applescript or another method?</p>
  
  <p>The problem is, that I have plenty txt files to go through with quite lot of data in each. It would take ages to clean up the given files. </p>
  
  <p>I can do it in xCode, but it would perform the scan each time the app is used, I rather do it in source and write less code. TextEdit removes all whitespace so the file becomes spaceless which I don't want.</p>
  
  <pre><code> item1
   item2
   item3
   item4
   item5
  </code></pre>
  
  <p>Where to start, please?</p>
  
  <p>Thank you </p>