Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ v10.0 : C library - <b>synopsis:</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <string.h>
    char *strchr( const char *s, int c );
    char __far *_fstrchr( const char __far *s, int c );

Description:
    The strchr and _fstrchr functions locate the first occurrence of c
    (converted to a char) in the string pointed to by s.  The terminating
    null character is considered to be part of the string.

    The _fstrchr function is a data model independent form of the strchr
    function.  It accepts far pointer arguments and returns a far pointer.
     It is most useful in mixed memory model applications.

Returns:
    The strchr and _fstrchr functions return a pointer to the located
    character, or NULL if the character does not occur in the string.

See Also:
    memchr, _fmemchr, strcspn, _fstrcspn, strrchr, _fstrrchr, strspn, _fstrspn, strstr, _fstrstr, strtok, _fstrtok

Example:
    #include <stdio.h>
    #include <string.h>

    void main()
      {
        char buffer[80];
        char *where;

        strcpy( buffer, "video x-rays" );
        where = strchr( buffer, 'x' );
        if( where == NULL ) {
            printf( "'x' not found\n" );
        }
      }

Classification:
    strchr is ANSI, _fstrchr is not ANSI

Systems:
     strchr - All

    _fstrchr - All

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