I have a filename like this WO.NO 193 AND TASK NO 15146.JPG. I want to split out the extension from the filename. Can someone tell how could i do this with NSSCanner, is there any other way than using the scanner. If so please let me know the solution.
There are methods in NSString
that do exactly that:
NSString *fn = @"WO.NO 193 AND TASK NO 15146.JPG";
NSString *basename = [fn stringByDeletingPathExtension];
NSString *extension= [fn pathExtension];
So no need to use a scanner, unless you also have other requirements.