I am interested in searching a string (using objective-c) starting from a specific character in the m开发者_如何学Goiddle of the string. I could split the string, but is there another way? I don't see an obvious option for that in the definition of NSString. I want to be able to search either backwards or forwards in the string starting from a defined character.
-[NSString rangeOfString:options:range:]
. Use the range
parameter to tell the string to only look in a sub-portion of the original string for the search string.
精彩评论