开发者社区 问答 正文

在目标c中的字符串数组中进行字符串搜索

我想在目标c的字符串数组中搜索特定的字符串。在这方面有人可以帮我吗? 问题来源于stack overflow

展开
收起
保持可爱mmm 2020-02-08 14:07:18 420 分享 版权
1 条回答
写回答
取消 提交回答
  • BOOL isTheObjectThere = [myArray containsObject: @"my string"]; 或者如果您需要知道它在哪里

    NSUInteger indexOfTheObject = [myArray indexOfObject: @"my string"];

    2020-02-08 14:07:28
    赞同 展开评论
问答地址: