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++ Language Reference - strchr http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
                                  strchr

   Usage
   include <string.h>
   char *strchr(const char *string,int ch);

   Description
   Finds the first occurrence of the character ch in string. It returns a
   pointer to character ch. strchr is identical to the function index.

   Example
   #include <stdio.h>
   #include <string.h>
   char string1[50] = " 1 Example string ";
   main()
   {
        printf("\nstrchr example [%s]\n",strchr(string1,'2'));
   }

   Return Value
   Pointer to character ch. A NULL pointer is returned if not found.


See Also: index memchr

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