Reputation: 83
Update: I forgot to mention that i have a big string of html and this src="" is a part of it. So, my question is how to find this particular "file:///.../" and remove it ?
How can I replace a NSString value
src="file:///var/mobile/Applications/92AE599A-1231223151B-4B3A-8C9B-950225AF5971/something.app/smiley-1.png"
to
src="smiley-1.png"
Upvotes: 2
Views: 237
Reputation: 34265
you can use componentsSeparatedByString function of NSString
NSArray *array = [src componentsSeparatedByString:@"/"];
src = [array lastObject];
Upvotes: 0