本文介绍了在目标C字符串数组中搜索字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在客观C字符串数组中搜索特定字符串。有人可以帮我在这方面?
解决方案 BOOL isTheObjectThere = [myArray的containsObject:@我的字符串];或者如果你需要知道它在哪里。
NSUInteger indexOfTheObject = [myArray的indexOfObject:@我的字符串];我强烈建议你阅读documentation在NSArray的的。事实上,你可能应该这样做可以发布您的问题之前: - )
I want to search a specific string in the array of strings in objective c. Can somebody help me in this regard?
解决方案 BOOL isTheObjectThere = [myArray containsObject: @"my string"];or if you need to know where it is
NSUInteger indexOfTheObject = [myArray indexOfObject: @"my string"];I strongly recommend you read the documentation on NSArray. In fact, you probably should have done that before posting your question :-)
更多推荐
在目标C字符串数组中搜索字符串
发布评论