Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>strstr</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
strstr

Usage

   #include <string.h>
   char *strstr(const char *string1,const char *string2);

   ANSI

Description

   Returns a pointer to the first occurrence of string2 within string1.

Example 

   #include <string.h>
   #include <stdio.h>
   #include <stdlib.h>

   char *string = " Example string";
   char *cmp = "str";

   int main()
   {
       printf("strstr Example [%s]\n",strstr(string,cmp));
       return EXIT_SUCCESS;
   }

Return Value

   strstr returns NULL if no occurrence was found. If string2 is of 0
   length, returns string1.





Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson