0

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.

1 Answer 1

1

Here it is:

BOOL stringInString(char *s1, char *s2)
{
    return (strstr(s1, s2) != NULL);
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.