How to get the file extension and remove the file extension in objective-c

0 votes
321 views
asked Jul 18, 2013 in Objective C by codeg (2,600 points)

Hi

  How to get the file extension and remove the file extension in objective-c

1 Answer

0 votes
answered Jul 18, 2013 by admin (8,135 points)

Hi Codeg

    Just use this piece of code to get the file extension

          [fileName pathExtension]

    For removing file extension

         [[fileName lastPathComponent] stringByDeletingPathExtension]

...