Is there any function in C which searches for a string in a string and returns 0 or 1.
Let's say string 1 is
"I love the whole world" and I want to search for
"love" then is there any function which appropriately returns 0 if not found and returns 1 if found.
strchr() searches for a character within a given string.
However, you want to find
I love the whole world, so you're searching a string in another. Take
strstr() for this.
While both functions don't return 0 or 1, I trust you to be able to wrap them in a way so that they do.