开发者

Searching a string from a specified start point in objective c

开发者 https://www.devze.com 2022-12-17 00:11 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消