Objective-C 在 NSArray 中搜索字符串?
我有一个字符串数组。
我如何才能找出字符串在数组中的索引?
I have an array of strings.
How might I be able to figure out what index a string is in a array?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
-[NSArray indexOfObject:]
-[NSArray indexOfObject:]
虽然很老了,但这个问题在谷歌搜索中的排名很高。这是使用块的版本,
Though very old but this question comes quite high in google search. Here is a version in using block,