问题:
How would I get the last occurrence of an NSString within another NSString? 如何在另一个NSString中获得最后一次出现的NSString? For example, in "abc def ghi abc def ghi," I want to find the index of the second "abc," not the first. 例如,在“abc def ghi abc def ghi”中,我想找到第二个“abc”的索引,而不是第一个。 I know I could do this with a bunch of rangeOfStrings, but is there already a function for that? 我知道我可以用一堆rangeOfStrings做到这一点,但是它已经有了这个功能吗?