How do I find the last occurrence of a substring in an NSString?
Use rangeOfString:options:
, including NSBackwardsSearch
in the options.
[@"abc def ghi abc def ghi" rangeOfString:@"abc" options:NSBackwardsSearch];
Use rangeOfString:options:
, including NSBackwardsSearch
in the options.
[@"abc def ghi abc def ghi" rangeOfString:@"abc" options:NSBackwardsSearch];