相关疑难解决方法(0)

如何找出是一个长字符串,一个字obj c,iphone

我有一个长字符串,其中包含文本框中所有"输入的单词"的运行列表.我希望能够针对一个单词字符串检查长字符串,以查看长字符串是否包含短字符串中的单词.

有任何想法吗?

我已经尝试了这个和其他一些东西,其中newString是长字符串,currentTextrightnow是短字符串.

textRange =[newString rangeOfString:currentTextrightnow];
NSLog(@"currenttextright now is %@", currentTextrightnow);
if(textRange.location != NSNotFound)

{

    NSLog(@"Does contatin the substring");

}
Run Code Online (Sandbox Code Playgroud)

string iphone compare objective-c

0
推荐指数
1
解决办法
476
查看次数

标签 统计

compare ×1

iphone ×1

objective-c ×1

string ×1