Testing if NSMutableArray contains a string object

后端 未结 5 490
醉酒成梦
醉酒成梦 2021-01-31 14:59

I have a NSMutableArray which contains a few NSString objects. How can I test if the array contains a particular string literal?

I tried

5条回答
  •  旧时难觅i
    2021-01-31 15:35

    for every object

    [(NSString *) [array objectAtIndex:i] isEqualToString:@"teststring"];
    

提交回复
热议问题