問題:
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做到這一點,但是它已經有了這個功能嗎?