Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有一些特殊字符的字符串。
问题是,我想从字符串末尾搜索那些特殊字符。
是否有任何方法可用于向后搜索字符索引?
是的,使用rangeOfCharacterFromSet:options:range:和使用NSBackwardsSearch选项参数。
rangeOfCharacterFromSet:options:range:
NSBackwardsSearch