Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Objective c 在IOS xcode程序中搜索字符数组中的字符串?_Objective C_Ios_Xcode - Fatal编程技术网

Objective c 在IOS xcode程序中搜索字符数组中的字符串?

Objective c 在IOS xcode程序中搜索字符数组中的字符串?,objective-c,ios,xcode,Objective C,Ios,Xcode,Char info[256]=“苹果、iPhone、iPad” 我想在这个char数组中搜索,比如在上面的数组中搜索“iPhone”, 返回TRUE,因为它包含此字符串 如何在iOS xcode程序中做到这一点?谢谢 在这里: BOOL stringInString(char *s1, char *s2) { return (strstr(s1, s2) != NULL); }

Char info[256]=“苹果、iPhone、iPad”

我想在这个char数组中搜索,比如在上面的数组中搜索“iPhone”, 返回TRUE,因为它包含此字符串

如何在iOS xcode程序中做到这一点?谢谢

在这里:

BOOL stringInString(char *s1, char *s2)
{
    return (strstr(s1, s2) != NULL);
}