I have some source code to get the file name of an url
for example:
http://www.google.com/a.pdf
I hope to get a.pdf
because the way to join 2 NSS
I think if you have already had the NSURL object, there is lastPathComponent method available from the iOS 4 onwards.
NSURL
lastPathComponent
NSURL *url = [NSURL URLWithString:@"http://www.google.com/a.pdf"]; NSString *filename = [url lastPathComponent];