title: What characters are allowed in a iOS file name?
body: <p>I'm looking for a way to make sure a string can be used as a file name under iOS. I'm currently in the section of the code that deletes incompatible characters. I'm wondering if I'm doing it right.</p>
  
  <pre><code>NSString *filename = @"A file name";
  fileName = [fileName stringByTrimmingCharactersInSet: [NSCharacterSet controlCharacterSet]];
  fileName = [fileName stringByTrimmingCharactersInSet: [NSCharacterSet newlineCharacterSet]];
  </code></pre>
  
  <p>I'm also wondering if there's already a method that validates a string as a file name.</p>
  
  <p>Thank you for your advice!</p>