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 *strstr( const char *str,
                  const char *substr );
    char __far *_fstrstr( const char __far *str,
                          const char __far *substr );
    #include <wchar.h>
    wchar_t *wcsstr( const wchar_t *str,
                     const wchar_t *substr );
    #include <mbstring.h>
    unsigned char *_mbsstr( const unsigned char *str,
                            const unsigned char *substr );
    unsigned char __far *_fmbsstr(
                        const unsigned char __far *str,
                        const unsigned char __far *substr );

Description:
    The strstr function locates the first occurrence in the string pointed
    to by str of the sequence of characters (excluding the terminating null
    character) in the string pointed to by substr.

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

    The wcsstr function is a wide-character version of strstr that operates
    with wide-character strings.

    The _mbsstr function is a multibyte character version of strstr that
    operates with multibyte character strings.

    The _fmbsstr function is a data model independent form of the _mbsstr
    function that accepts far pointer arguments.  It is most useful in mixed
    memory model applications.

Returns:
    The strstr function returns a pointer to the located string, or NULL if
    the string is not found.

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

    void main()
      {
        printf( "%s\n", strstr("This is an example", "is") );
      }

    produces the following:

    is is an example

Classification:
    strstr is ANSI, _fstrstr is not ANSI, wcsstr is ANSI, _mbsstr is not
    ANSI, _fmbsstr is not ANSI

Systems:
     strstr - All, Netware

    _fstrstr - All
    wcsstr - All
    _mbsstr - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32
    _fmbsstr - DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    strcspn

See Also:

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