Noung Noung - 4 months ago 33
Objective-C Question

Objective c Substring

Please help me, I want to Substring like that " "
and I want to get " abc.pdf ". It mean I want to get file name of pdf.

Note: it is not the same string.
Forexample :, and sometime



Use the lastPathComponent method of NSURL.

NSURL *url = [NSURL URLWithString:@""];
NSString *filename = [url lastPathComponent];