title: Trim Array Path TO JUST Filename
body: <p>My NSArray is:</p>
  
  <pre><code>self.files  = [bundle pathsForResourcesOfType:@"ppt" inDirectory:@"thepowerpoints"];
  </code></pre>
  
  <p>This returns the full path of </p>
  
  <pre><code>/User/Name/.../filename.ppt
  </code></pre>
  
  <p>I can use a NSString to get only the filename using:</p>
  
  <pre><code>NSString *documentsDirectoryPath = [self.files objectAtIndex:thepath.row];
  self.filenames = [[documentsDirectoryPath lastPathComponent] stringByDeletingPathExtension];
  </code></pre>
  
  <p>Is there a way that I can cleanup the original NSArray to only return the lastPathComponent without the extension?</p>
  
  <p>Am needing to do this to search within the tableview array.  Currently, if a file is named "Test.ppt" the search bar will show it if I type in "/User/Name", because the Array it is searching includes the entire path.</p>
  
  <p>I would prefer for it to only search the filename.</p>