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 Library Reference - <u>synopsis:</u> 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 );
    #include <wchar.h>
    wchar_t *wcschr( const wchar_t *s, int c );
    #include <mbstring.h>
    unsigned char *_mbschr( const unsigned char *s,
                            unsigned int c );
    unsigned char __far *_fmbschr(
                const unsigned char __far *s,
                unsigned int c );

Description:
    The strchr function locates 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.

    The wcschr function is a wide-character version of strchr that operates
    with wide-character strings.

    The _mbschr function is a multibyte character version of strchr that
    operates with multibyte character strings.

Returns:
    The strchr function returns a pointer to the located character, or NULL
    if the character does not occur in the string.

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, wcschr is ANSI, _mbschr is not
    ANSI, _fmbschr is not ANSI

Systems:
     strchr - All, Netware

    _fstrchr - All
    wcschr - All
    _mbschr - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbschr - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    memchr, strcspn, strrchr, strspn, strstr, strtok

See Also:

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