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 haven't tried this yet, but it seems like you might be trying to do this the hard way. The iPhone libraries have the NSURL
class, and I imagine that you could simply do:
NSString *url = [NSURL URLWithString:@"http://www.google.com/a.pdf"];
NSString *path = [url path];
Definitely look for a built in function. The libraries have far more testing and will handle the edge cases better than anything you or I will write in an hour or two (generally speaking).