How to get last string component from NSURL String.
suggest changeNSURL *url = [NSURL URLWithString:@"http://www.example.com/images/apple-tree.jpg"];
NSString *fileName = [url lastPathComponent];
// fileName = "apple-tree.jpg"
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents