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

   Usage
   char *index(char *s,int c);

   Description
   index  searches  for the first occurrence of the character  c  in  the
   string  s. This function is identical to strchr which is ANSI  C,  and
   therefore preferred.

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

   Return Value
   Returns  a pointer to c if c is found in the string or a NULL if c  is
   not in the string.


See Also: strchr strcpy strcmp strrchr

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