Reputation: 1187
Char info[256]="Apple,iPhone,iPad";
I want to search in this char array, for example, search "iPhone" in the above array, Return TRUE since it contains this string.
How to do that in iOS xcode program? Thanks.
Upvotes: 0
Views: 441
Reputation: 1176
Here it is:
BOOL stringInString(char *s1, char *s2)
{
return (strstr(s1, s2) != NULL);
}
Upvotes: 1